Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Unified Diff: testing/android/appurify_support/java/src/org/chromium/test/support/RobotiumBundleGenerator.java

Issue 1173363008: [Android] Refactor browser test execution. (RELAND) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: testing/android/appurify_support/java/src/org/chromium/test/support/RobotiumBundleGenerator.java
diff --git a/testing/android/appurify_support/java/src/org/chromium/test/support/RobotiumBundleGenerator.java b/testing/android/appurify_support/java/src/org/chromium/test/support/RobotiumBundleGenerator.java
index 167e7b92a4f900e23b3ef0c7097d22fee9c9b323..e006954cfb2d9dedcab12dcfa3949b0562330a65 100644
--- a/testing/android/appurify_support/java/src/org/chromium/test/support/RobotiumBundleGenerator.java
+++ b/testing/android/appurify_support/java/src/org/chromium/test/support/RobotiumBundleGenerator.java
@@ -20,6 +20,7 @@ public class RobotiumBundleGenerator implements ResultsBundleGenerator {
public Bundle generate(Map<String, ResultsBundleGenerator.TestResult> rawResults) {
int testsPassed = 0;
int testsFailed = 0;
+ int testsErrored = 0;
for (Map.Entry<String, ResultsBundleGenerator.TestResult> entry : rawResults.entrySet()) {
switch (entry.getValue()) {
@@ -32,6 +33,9 @@ public class RobotiumBundleGenerator implements ResultsBundleGenerator {
Log.d(TAG, "FAILED: " + entry.getKey());
++testsFailed;
break;
+ case UNKNOWN:
+ ++testsErrored;
+ break;
default:
Log.w(TAG, "Unhandled: " + entry.getKey() + ", "
+ entry.getValue().toString());
@@ -40,10 +44,11 @@ public class RobotiumBundleGenerator implements ResultsBundleGenerator {
}
StringBuilder resultBuilder = new StringBuilder();
- if (testsFailed > 0) {
- resultBuilder.append(
- "\nFAILURES!!! Tests run: " + Integer.toString(rawResults.size())
- + ", Failures: " + Integer.toString(testsFailed) + ", Errors: 0");
+ if (testsFailed > 0 || testsErrored > 0) {
+ resultBuilder.append("\nFAILURES!!! ")
+ .append("Tests run: ").append(Integer.toString(rawResults.size()))
+ .append(", Failures: ").append(Integer.toString(testsFailed))
+ .append(", Errors: ").append(Integer.toString(testsErrored));
} else {
resultBuilder.append("\nOK (" + Integer.toString(testsPassed) + " tests)");
}

Powered by Google App Engine
This is Rietveld 408576698