commit | ef919383137db858c8fee47b16fe602a8e2c592b | [log] [tgz] |
---|---|---|
author | Inseob Kim <inseob@google.com> | Mon Sep 26 14:01:56 2022 +0900 |
committer | Inseob Kim <inseob@google.com> | Mon Sep 26 14:02:28 2022 +0900 |
tree | 491a9c3164edcd7cf76b2ff8e59ed0b6d863a889 | |
parent | b131646cbdb131cb20f692e4e4b5c83df5fef222 [diff] |
Add debug property to skip benchmarks This is to reduce noises, due to differences between devices. Bug: 248386237 Test: atest MicrodroidTests with the prop set to true Change-Id: I5ae18e35fcde02d6c5fb8bb50a328e13cfb733b3
diff --git a/tests/benchmark/src/java/com/android/microdroid/benchmark/MicrodroidBenchmarks.java b/tests/benchmark/src/java/com/android/microdroid/benchmark/MicrodroidBenchmarks.java index 7bf3c4e..41661e9 100644 --- a/tests/benchmark/src/java/com/android/microdroid/benchmark/MicrodroidBenchmarks.java +++ b/tests/benchmark/src/java/com/android/microdroid/benchmark/MicrodroidBenchmarks.java
@@ -76,6 +76,7 @@ @Before public void setup() { + assume().that(shouldSkipBenchmarks()).isFalse(); prepareTestSetup(mProtectedVm); mInstrumentation = getInstrumentation(); }
diff --git a/tests/helper/src/java/com/android/microdroid/test/device/MicrodroidDeviceTestBase.java b/tests/helper/src/java/com/android/microdroid/test/device/MicrodroidDeviceTestBase.java index fdc846e..c0b76da 100644 --- a/tests/helper/src/java/com/android/microdroid/test/device/MicrodroidDeviceTestBase.java +++ b/tests/helper/src/java/com/android/microdroid/test/device/MicrodroidDeviceTestBase.java
@@ -51,6 +51,10 @@ return VirtualizationTestHelper.isCuttlefish(SystemProperties.get("ro.product.name")); } + public static boolean shouldSkipBenchmarks() { + return SystemProperties.getBoolean("debug.avf.benchmark.skip", false); + } + // TODO(b/220920264): remove Inner class; this is a hack to hide virt APEX types protected static class Inner { private final boolean mProtectedVm;