You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[tests] Add .apk test job to azure-pipelines.yaml (#3042)
Adds a `Test` stage to `build-tools/automation/azure-pipelines.yaml`.
At present, this stage only contains one test job, which builds and
runs the following emulator tests:
* Mono.Android_Tests
* Mono.Android-Tests (AOT + LLVM)
* Mono.Android-Tests (Bundle)
* Mono.Android-Tests (Profiled AOT)
* Mono.Android_TestsAppBundle
* Mono.Android_TestsMultiDex
* Xamarin.Android.JcwGen_Tests
* Xamarin.Android.Locale_Tests
* Xamarin.Android.Locale-Tests (AOT)
* Xamarin.Android.Locale-Tests (Profiled AOT)
* Xamarin.Android.EmbeddedDSO_Test
* Xamarin.Forms.Performance.Integration.Droid
* Xamarin.Forms.Performance.Integration.Droid (AOT)
* Xamarin.Forms.Performance.Integration.Droid (Profiled AOT)
* Xamarin.Forms.Performance.Integration.Droid (Bundle)
Note in particular that the BCL tests are currently absent.
Execution of the BCL Test suite will also need to be added to the
`Test` stage in the future.
Other Fixes:
* Introductory support has been added for running `.apk` tests
against a *system* Xamarin.Android installation.
We can now build and run `Xamarin.Android.JcwGen_Tests`,
`Mono.Android_Tests`, and
`Xamarin.Forms.Performance.Integration.Droid` tests against a
system installation of Xamarin.Android.
* Produce an error when any test failures occur during
instrumentation.
The instrumentation exit code value of `-1` indicates success,
and any other values returned here should be reported as errors.
A non `-1` value indicates that crash or test failure occurred.
* Produce an error if `adb logcat` timing data can't be parsed.
We'll now error out when parsing `adb logcat` for timing data if
the running application died, or if we fail to detect application
startup.
* Don't always report `adb logcat` stderr as a warning
`adb` invocations are prone to returning non zero exit codes even
when they are successful. This can make our MSBuild output a bit
noisy [^0] when they are invoked using the `<Adb/>` task.
The new optional `Adb.WriteOutputAsMessage` property can now be
provided to the adb task, so that we don't always write messages
coming from stderr as MSBuild warnings. This is used in our
targets which wait for emulator startup to make it easier to
detect real failures in test instrumentation and emulator startup.
[^0]: Example warnings:
…/xamarin-android/build-tools/scripts/TestApks.targets(68,5): warning : adb D 04-29 15:10:48 3527 42649 adb_trace.cpp:192] Android Debug Bridge version 1.0.40
…/xamarin-android/build-tools/scripts/TestApks.targets(68,5): warning : adb D 04-29 15:10:48 3527 42649 adb_trace.cpp:192] Version 28.0.2-5303910
…/xamarin-android/build-tools/scripts/TestApks.targets(68,5): warning : adb D 04-29 15:10:48 3527 42649 adb_trace.cpp:192] Installed as /Users/peter/android-toolchain/sdk/platform-tools/adb
…/xamarin-android/build-tools/scripts/TestApks.targets(68,5): warning : adb D 04-29 15:10:48 3527 42649 adb_trace.cpp:192]
…/xamarin-android/build-tools/scripts/TestApks.targets(68,5): warning : adb D 04-29 15:10:48 3527 42649 adb_client.cpp:287] adb_query: host-serial:emulator-5570:features
…/xamarin-android/build-tools/scripts/TestApks.targets(68,5): warning : adb D 04-29 15:10:48 3527 42649 adb_client.cpp:137] _adb_connect: host:version
…/xamarin-android/build-tools/scripts/TestApks.targets(68,5): warning : adb D 04-29 15:10:48 3527 42649 adb_io.cpp:107] writex: fd=3 len=16 30303063686f73743a76657273696f6e 000chost:version
…/xamarin-android/build-tools/scripts/TestApks.targets(68,5): warning : adb D 04-29 15:10:48 3527 42649 adb_io.cpp:81] readx: fd=3 wanted=4
…/xamarin-android/build-tools/scripts/TestApks.targets(68,5): warning : adb D 04-29 15:10:48 3527 42649 adb_io.cpp:97] readx: fd=3 wanted=4 got=4 4f4b4159 OKAY
…/xamarin-android/build-tools/scripts/TestApks.targets(68,5): warning : adb D 04-29 15:10:48 3527 42649 adb_client.cpp:165] _adb_connect: return fd 3
…/xamarin-android/build-tools/scripts/TestApks.targets(68,5): warning : adb D 04-29 15:10:48 3527 42649 adb_client.cpp:197] adb_connect: service host-serial:emulator-5570:features
…/xamarin-android/build-tools/scripts/TestApks.targets(68,5): warning : adb D 04-29 15:10:48 3527 42649 adb_io.cpp:81] readx: fd=3 wanted=4
Copy file name to clipboardExpand all lines: build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks/RunInstrumentationTests.cs
+18-4Lines changed: 18 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@ public class RunInstrumentationTests : Adb
0 commit comments