Skip to content

Commit 3fa9e9e

Browse files
authored
[tests] Ensure emulator is killed (dotnet#602)
A "funny thing" happened in [PR Build dotnet#958][0]: `adb` failed: Target ReleaseAndroidTarget: Task "Adb" ... Tool /Users/builder/android-toolchain/sdk/platform-tools/adb execution started with arguments: -s emulator-5570 logcat -d ... Task "Adb" execution -- FAILED I have no idea why `adb` is failing, but *because* it failed, the emulator was never shutdown and killed. Add `ContinueOnError="True"` to most of the tasks within the `ReleaseAndroidTarget` target to ensure that the emulator is shutdown and killed. [0]: https://jenkins.mono-project.com/job/xamarin-android-pr-builder/958/
1 parent 4799ea2 commit 3fa9e9e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

build-tools/scripts/UnitTestApks.targets

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,26 @@
6060
<Target Name="ReleaseAndroidTarget">
6161
<Adb
6262
Condition="'@(_FailedComponent)' != ''"
63+
ContinueOnError="True"
6364
Arguments="$(_EmuTarget) logcat -d"
6465
ToolExe="$(AdbToolExe)"
6566
ToolPath="$(AdbToolPath)"
6667
/>
6768
<Adb
6869
Condition=" '$(_EmuTarget)' != '' "
70+
ContinueOnError="True"
6971
Arguments="$(_EmuTarget) emu kill"
7072
ToolExe="$(AdbToolExe)"
7173
ToolPath="$(AdbToolPath)"
7274
/>
7375
<KillProcess
7476
Condition=" '$(_EmuTarget)' != '' "
77+
ContinueOnError="True"
7578
ProcessId="$(_EmuPid)"
7679
/>
7780
<Adb
7881
Arguments="kill-server"
82+
ContinueOnError="True"
7983
ToolExe="$(AdbToolExe)"
8084
ToolPath="$(AdbToolPath)"
8185
/>

0 commit comments

Comments
 (0)