Skip to content

Commit

Permalink
[tests] Wait for the emulator to fully boot (#620)
Browse files Browse the repository at this point in the history
- 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?
  • Loading branch information
radekdoulik authored and jonpryor committed Jun 2, 2017
1 parent 84d4230 commit bc6440b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions build-tools/scripts/UnitTestApks.targets
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@
ToolExe="$(AdbToolExe)"
ToolPath="$(AdbToolPath)"
/>
<Xamarin.Android.Tools.BootstrapTasks.Adb
Condition=" '$(_ValidAdbTarget)' != 'True' "
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'"
ToolExe="$(AdbToolExe)"
ToolPath="$(AdbToolPath)"
/>
<Message
Condition=" '$(_EmuTarget)' != '' "
Text="Launched Android emulator; `adb` target: '$(_AdbTarget)'"
Expand Down

0 comments on commit bc6440b

Please sign in to comment.