Merge "Make CTS host capture JUnit errors too." into froyo
diff --git a/tools/host/src/com/android/cts/CtsTestResult.java b/tools/host/src/com/android/cts/CtsTestResult.java
index 0aea74b3..851b07d 100644
--- a/tools/host/src/com/android/cts/CtsTestResult.java
+++ b/tools/host/src/com/android/cts/CtsTestResult.java
@@ -157,7 +157,7 @@
int resCode = CODE_PASS;
String failedMessage = null;
String stackTrace = null;
- if ((testResult != null) && (testResult.failureCount() > 0)) {
+ if ((testResult != null) && (testResult.failureCount() > 0 || testResult.errorCount() > 0)) {
resCode = CODE_FAIL;
Enumeration<TestFailure> failures = testResult.failures();
while (failures.hasMoreElements()) {
@@ -165,6 +165,12 @@
failedMessage += failure.exceptionMessage();
stackTrace += failure.trace();
}
+ Enumeration<TestFailure> errors = testResult.errors();
+ while (errors.hasMoreElements()) {
+ TestFailure failure = errors.nextElement();
+ failedMessage += failure.exceptionMessage();
+ stackTrace += failure.trace();
+ }
}
mResultCode = resCode;
mFailedMessage = failedMessage;