summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuang Zhu <guangzhu@google.com>2013-08-20 14:49:58 -0700
committerGuang Zhu <guangzhu@google.com>2013-08-20 14:51:37 -0700
commitbab88c7b038721b4a923002a3b3158787b23b021 (patch)
treec2ac6d521d81a2e05e7ba9a6c7f51c8b8742911a
parent858ce51dd76a1ee30fd85c13cbb2317e1d387326 (diff)
downloaduiautomator-bab88c7b038721b4a923002a3b3158787b23b021.tar.gz
Tweak UI automator runner output format
For uncaught exceptions, output exception message as shortMsg Change-Id: Ied019d3170a5afc9ebeab8251f66f69d9a9c2282
-rw-r--r--library/testrunner-src/com/android/uiautomator/testrunner/UiAutomatorTestRunner.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/testrunner-src/com/android/uiautomator/testrunner/UiAutomatorTestRunner.java b/library/testrunner-src/com/android/uiautomator/testrunner/UiAutomatorTestRunner.java
index ff3ed69..ef167f9 100644
--- a/library/testrunner-src/com/android/uiautomator/testrunner/UiAutomatorTestRunner.java
+++ b/library/testrunner-src/com/android/uiautomator/testrunner/UiAutomatorTestRunner.java
@@ -162,6 +162,7 @@ public class UiAutomatorTestRunner {
} catch (Throwable t) {
// catch all exceptions so a more verbose error message can be outputted
resultPrinter.printUnexpectedError(t);
+ testRunOutput.putString("shortMsg", t.getMessage());
} finally {
long runTime = SystemClock.uptimeMillis() - startTime;
resultPrinter.print(testRunResult, runTime, testRunOutput);