diff options
author | 2022-11-21 16:49:20 -0800 | |
---|---|---|
committer | 2022-11-23 20:05:58 +0000 | |
commit | 1dda1196d9d5d840caae24864df6df9c7b367fe4 (patch) | |
tree | 5f37aa31d76f534219b460fd972ec8e1595d7255 /tests/DynamicCodeLoggerIntegrationTests/src | |
parent | ccb1e8f6bc9596a3afb6b2ae4bf0961c851b1dc1 (diff) |
DCL: disable DynamicCodeLoggerIntegrationTests for watch
- DynamicCodeLoggingService doesn't run on watch, therefore disable its
related tests.
BUG: 253517106
Change-Id: I07cc3d7e7f58b01c0a8bd1a30fbf1e66a78ce7a2
(cherry picked from commit 9a18b568e3bf69f855cb231b488767967f904ea8)
(cherry picked from commit 1339078c8e590c29762560c65caf502e648f0a6f)
Diffstat (limited to 'tests/DynamicCodeLoggerIntegrationTests/src')
-rw-r--r-- | tests/DynamicCodeLoggerIntegrationTests/src/com/android/server/pm/dex/DynamicCodeLoggerIntegrationTests.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/DynamicCodeLoggerIntegrationTests/src/com/android/server/pm/dex/DynamicCodeLoggerIntegrationTests.java b/tests/DynamicCodeLoggerIntegrationTests/src/com/android/server/pm/dex/DynamicCodeLoggerIntegrationTests.java index 5430dee5ca31..cfebf3462b57 100644 --- a/tests/DynamicCodeLoggerIntegrationTests/src/com/android/server/pm/dex/DynamicCodeLoggerIntegrationTests.java +++ b/tests/DynamicCodeLoggerIntegrationTests/src/com/android/server/pm/dex/DynamicCodeLoggerIntegrationTests.java @@ -19,8 +19,11 @@ package com.android.server.pm.dex; import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth.assertWithMessage; +import static org.junit.Assume.assumeFalse; + import android.app.UiAutomation; import android.content.Context; +import android.content.pm.PackageManager; import android.os.Build; import android.os.ParcelFileDescriptor; import android.os.SystemClock; @@ -96,7 +99,12 @@ public final class DynamicCodeLoggerIntegrationTests { } @Before - public void primeEventLog() { + public void setup() { + assumeFalse(sContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH)); + primeEventLog(); + } + + private void primeEventLog() { // Force a round trip to logd to make sure everything is up to date. // Without this the first test passes and others don't - we don't see new events in the // log. The exact reason is unclear. |