Skip to content

Commit bc6440b

Browse files
radekdoulikjonpryor
authored andcommitted
[tests] Wait for the emulator to fully boot (#620)
- so that we avoid issue like this (from Jenkins log): Task Adb Arguments: -s emulator-5570 uninstall "Mono.Android_Tests" Tool /Users/builder/android-toolchain/sdk/platform-tools/adb execution started with arguments: -s emulator-5570 uninstall "Mono.Android_Tests" Environment variables being passed to the tool: Error: Could not access the Package Manager. Is the system running?
1 parent 84d4230 commit bc6440b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

build-tools/scripts/UnitTestApks.targets

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@
5151
ToolExe="$(AdbToolExe)"
5252
ToolPath="$(AdbToolPath)"
5353
/>
54+
<Xamarin.Android.Tools.BootstrapTasks.Adb
55+
Condition=" '$(_ValidAdbTarget)' != 'True' "
56+
Arguments="$(_EmuTarget) shell 'counter=0; while [ $counter -lt 60 ] &amp;&amp; [ &quot;`getprop sys.boot_completed`&quot; != &quot;1&quot; ]; do echo Waiting for device to fully boot; sleep 1; let &quot;counter++&quot;; done'"
57+
ToolExe="$(AdbToolExe)"
58+
ToolPath="$(AdbToolPath)"
59+
/>
5460
<Message
5561
Condition=" '$(_EmuTarget)' != '' "
5662
Text="Launched Android emulator; `adb` target: '$(_AdbTarget)'"

0 commit comments

Comments
 (0)