From 7a295f21b63b4d7d681d936e6b9e81d18c521775 Mon Sep 17 00:00:00 2001 From: Kohsuke Yatoh Date: Wed, 5 May 2021 22:00:18 -0700 Subject: [PATCH] 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 --- .../android/updatablesystemfont/UpdatableSystemFontTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/UpdatableSystemFontTest/src/com/android/updatablesystemfont/UpdatableSystemFontTest.java b/tests/UpdatableSystemFontTest/src/com/android/updatablesystemfont/UpdatableSystemFontTest.java index 9793c3447ff27..898b8d4cbdc13 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"); }