Trim output before testing
Change-Id: I5a720c2743abc2395e164ee8b1c4236230fcfa0a
Fixes: 62233495
Test: [on fugu & sailfish] cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.EphemeralTest#testExposedSystemActivities
(cherry picked from commit 170e06be91a149018291d562e5837ae1766d3dfa)
diff --git a/hostsidetests/appsecurity/src/android/appsecurity/cts/EphemeralTest.java b/hostsidetests/appsecurity/src/android/appsecurity/cts/EphemeralTest.java
index c0e8b6a..fdd2f06 100644
--- a/hostsidetests/appsecurity/src/android/appsecurity/cts/EphemeralTest.java
+++ b/hostsidetests/appsecurity/src/android/appsecurity/cts/EphemeralTest.java
@@ -194,7 +194,7 @@
if (exposed) {
runDeviceTests(EPHEMERAL_1_PKG, TEST_CLASS, "testExposedActivity", testArgs);
} else {
- CLog.i("Skip intent; " + dumpArgs(testArgs));
+ CLog.w("Skip intent; " + dumpArgs(testArgs));
}
}
}
@@ -246,7 +246,8 @@
if (testArgs.get("mime_type") != null) {
command.append(" -t ").append(testArgs.get("mime_type"));
}
- return !"No activities found".equals(getDevice().executeShellCommand(command.toString()));
+ final String output = getDevice().executeShellCommand(command.toString()).trim();
+ return !"No activities found".equals(output);
}
private static final String dumpArgs(Map<String, String> testArgs) {