compos_bench: Skip testGuestCompileTime on CF
Takes too long and tests time out.
Test: TH
Change-Id: I49d9fc26dc934174a1690151d73f75a29b46bebe
diff --git a/compos/benchmark/src/java/com/android/compos/benchmark/ComposBenchmark.java b/compos/benchmark/src/java/com/android/compos/benchmark/ComposBenchmark.java
index be9bb50..3244031 100644
--- a/compos/benchmark/src/java/com/android/compos/benchmark/ComposBenchmark.java
+++ b/compos/benchmark/src/java/com/android/compos/benchmark/ComposBenchmark.java
@@ -17,11 +17,14 @@
import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
+import static com.google.common.truth.TruthJUnit.assume;
+
import static org.junit.Assert.assertTrue;
import android.app.Instrumentation;
import android.os.Bundle;
import android.os.ParcelFileDescriptor;
+import android.os.SystemProperties;
import android.util.Log;
import org.junit.Before;
@@ -51,6 +54,15 @@
private Instrumentation mInstrumentation;
+ private boolean isCuttlefish() {
+ String productName = SystemProperties.get("ro.product.name");
+ return (null != productName)
+ && (productName.startsWith("aosp_cf_x86")
+ || productName.startsWith("aosp_cf_arm")
+ || productName.startsWith("cf_x86")
+ || productName.startsWith("cf_arm"));
+ }
+
@Before
public void setup() {
mInstrumentation = getInstrumentation();
@@ -119,6 +131,7 @@
@Test
public void testGuestCompileTime() throws InterruptedException, IOException {
+ assume().withMessage("Skip on CF; too slow").that(isCuttlefish()).isFalse();
final String command = "/apex/com.android.compos/bin/composd_cmd test-compile";