Print host output on monkey test failure
Bug 6681325
Change-Id: I5cb6df8ad895af18329f7b451aa07e24b0603c93
diff --git a/hostsidetests/monkey/src/com/android/cts/monkey/PackageTest.java b/hostsidetests/monkey/src/com/android/cts/monkey/PackageTest.java
index aa6106b..0e8f276 100644
--- a/hostsidetests/monkey/src/com/android/cts/monkey/PackageTest.java
+++ b/hostsidetests/monkey/src/com/android/cts/monkey/PackageTest.java
@@ -20,18 +20,18 @@
public void testSinglePackage() throws Exception {
String out = mDevice.executeShellCommand("monkey -v -p " + PKGS[0] + " 5000");
- assertTrue(out.contains("cmp=com.android.cts.monkey/.MonkeyActivity"));
- assertFalse(out.contains("cmp=com.android.cts.monkey2/.ChimpActivity"));
+ assertTrue(out, out.contains("cmp=com.android.cts.monkey/.MonkeyActivity"));
+ assertFalse(out, out.contains("cmp=com.android.cts.monkey2/.ChimpActivity"));
out = mDevice.executeShellCommand("monkey -v -p " + PKGS[1] + " 5000");
- assertFalse(out.contains("cmp=com.android.cts.monkey/.MonkeyActivity"));
- assertTrue(out.contains("cmp=com.android.cts.monkey2/.ChimpActivity"));
+ assertFalse(out, out.contains("cmp=com.android.cts.monkey/.MonkeyActivity"));
+ assertTrue(out, out.contains("cmp=com.android.cts.monkey2/.ChimpActivity"));
}
public void testMultiplePackages() throws Exception {
String out = mDevice.executeShellCommand("monkey -v -p " + PKGS[0]
+ " -p " + PKGS[1] + " 5000");
- assertTrue(out.contains("cmp=com.android.cts.monkey/.MonkeyActivity"));
- assertTrue(out.contains("cmp=com.android.cts.monkey2/.ChimpActivity"));
+ assertTrue(out, out.contains("cmp=com.android.cts.monkey/.MonkeyActivity"));
+ assertTrue(out, out.contains("cmp=com.android.cts.monkey2/.ChimpActivity"));
}
}