diff options
author | Kohsuke Yatoh <kyatoh@google.com> | 2021-05-05 22:00:18 -0700 |
---|---|---|
committer | Kohsuke Yatoh <kyatoh@google.com> | 2021-05-05 22:00:18 -0700 |
commit | 7a295f21b63b4d7d681d936e6b9e81d18c521775 (patch) | |
tree | db8fb5865ac326b21f7b26ed188d3c269caa8c9a | |
parent | a759abbe4b0d1336a43a33042702c07fed2df33c (diff) |
Ignore 'cmd font clear' failure in tearDown().
This would fail (as expected) on Pixel 3 / 3a.
On Pixel 3 / 3a, we skip the test in assumeTrue() in setUp(). tearDown()
should not throw and make the test fail.
Bug: 187364676
Test: forrest
Change-Id: I9e82c2e27c3ef71e73bf022db543318cfc0f2ef7
-rw-r--r-- | tests/UpdatableSystemFontTest/src/com/android/updatablesystemfont/UpdatableSystemFontTest.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/UpdatableSystemFontTest/src/com/android/updatablesystemfont/UpdatableSystemFontTest.java b/tests/UpdatableSystemFontTest/src/com/android/updatablesystemfont/UpdatableSystemFontTest.java index 9793c3447ff2..898b8d4cbdc1 100644 --- a/tests/UpdatableSystemFontTest/src/com/android/updatablesystemfont/UpdatableSystemFontTest.java +++ b/tests/UpdatableSystemFontTest/src/com/android/updatablesystemfont/UpdatableSystemFontTest.java @@ -112,7 +112,8 @@ public class UpdatableSystemFontTest { @After public void tearDown() throws Exception { - expectCommandToSucceed("cmd font clear"); + // Ignore errors because this may fail if updatable system font is not enabled. + runShellCommand("cmd font clear", null); if (mKeyId != null) { expectCommandToSucceed("mini-keyctl unlink " + mKeyId + " .fs-verity"); } |