Allow crashCommand for tombstone to fail
Because the crash command is meant to "crash" microdroid, it can
sometimes fail (due to adbd exiting too early). Using tryRun can reduce
flakiness.
Bug: 325035938
Test: atest MicrodroidHostTests
Change-Id: I45e4f578d6ea62bc6bb7b29b3b36221738b5f9cc
(cherry picked from commit 1aa4bdf4458f492729bff274953b4748322b0be7)
diff --git a/tests/hostside/java/com/android/microdroid/test/MicrodroidHostTests.java b/tests/hostside/java/com/android/microdroid/test/MicrodroidHostTests.java
index 9dbaa5e..75cf61e 100644
--- a/tests/hostside/java/com/android/microdroid/test/MicrodroidHostTests.java
+++ b/tests/hostside/java/com/android/microdroid/test/MicrodroidHostTests.java
@@ -513,7 +513,8 @@
mMicrodroidDevice.enableAdbRoot();
CommandRunner microdroid = new CommandRunner(mMicrodroidDevice);
- microdroid.run(crashCommand);
+ // can crash in the middle of crashCommand; fail is ok
+ microdroid.tryRun(crashCommand);
// check until microdroid is shut down
CommandRunner android = new CommandRunner(getDevice());