forked from dotnet/android
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tests] move all device MSBuild tests to MSBuildDeviceIntegration.dll (…
…dotnet#4915) Since 044bbe5, the `MSBuildDeviceIntegration` tests have mostly been ignored because `BaseTest.HasDevices` is returning `false`... > adb shell getprop ro.build.version.sdk * daemon not running; starting now at tcp:5037 * daemon started successfully adb.exe: device offline If you simply run the command again, it works. I made this change in `BaseTest.cs`. We also noticed the first test assembly, `Xamarin.Android.Build.Tests.dll`, passes, but not `MSBuildDeviceIntegration.dll`. Currently, `Xamarin.Android.Build.Tests.dll` has a single test: ./packages/nunit.consolerunner/3.11.1/tools/nunit3-console.exe /Users/runner/work/1/s/bin/TestRelease/Xamarin.Android.Build.Tests.dll --result TestResult-MSBuildDeviceTests-Release.xml --where "cat == UsesDevice" ... Test Run Summary Overall result: Passed Test Count: 1, Passed: 1, Failed: 0, Warnings: 0, Inconclusive: 0, Skipped: 0 To improve things: * Move `BundleToolTests` to `MSBuildDeviceIntegration.dll`. * Don't run `Xamarin.Android.Build.Tests.dll` on this phase at all. * Make any calls that `Assert.Ignore()` for missing devices `Assert.Fail()` instead. After this there was still one failed test: ApplicationRunsWithDebuggerAndBreaks Should have hit 3 breakpoints. Only hit 2 Expected: 3 But was: 2 The breakpoint set for `MainActivity.cs` line 19 is an empty line. This test passes if I change it to line 20. I tested the IDE, and it won't let me even put a breakpoint on an empty line. I also improved the logging for each breakpoint hit in these tests. Other changes: * `MSBuildDeviceIntegration.csproj` now uses a wildcard to grab the `Utilities` directory from `Xamarin.Android.Build.Tests\Utilities`. * Added helper methods: `AssertHasDevices()` and `AssertCommercialBuild()`. * `MSBuildDeviceIntegration.dll` now needs to be listed in `[assembly:InternalsVisibleTo]`. * Added `[Category ("UsesDevice")]` to any tests using devices.
- Loading branch information
1 parent
c633dd6
commit 799506a
Showing
18 changed files
with
128 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.