Not crashing tests when a test fails to deinitialize

This causes nondescript diags "Test failed to run to completion.
Reason: 'Instrumentation run failed due to 'Process crashed.''. Check
device logcat for details"

Now quietly skipping all consequent tests after such failure.

Change-Id: I3747cda1a3094bfe82e27eae39ba9e9dfd4af9b6
This commit is contained in:
vadimt
2020-01-27 19:26:00 -08:00
parent ce67572ec8
commit 053cb7a6e6
2 changed files with 31 additions and 10 deletions

View File

@@ -183,16 +183,8 @@ public abstract class AbstractLauncherUiTest {
@After
public void verifyLauncherState() {
try {
// Limits UI tests affecting tests running after them.
mLauncher.waitForLauncherInitialized();
} catch (Throwable t) {
Log.e(TAG,
"Couldn't deinit after a test, exiting tests, see logs for failures that "
+ "could have caused this",
t);
exit(1);
}
// Limits UI tests affecting tests running after them.
mLauncher.waitForLauncherInitialized();
}
protected void clearLauncherData() throws IOException, InterruptedException {