summaryrefslogtreecommitdiff
path: root/cmds/am/src
diff options
context:
space:
mode:
authorMakoto Onuki <omakoto@google.com>2017-08-02 14:40:12 -0700
committerMakoto Onuki <omakoto@google.com>2017-08-02 14:49:30 -0700
commit6fb2c9718cde124f10edfbf45893b5a0cd537e11 (patch)
tree474928936daf5857d1cc341861b1577c107a28ba /cmds/am/src
parentf6764fb7f7a26e202b1ebb861e095979b0f9560a (diff)
Bit: Don't ignore errors and crashes
Bit used to only see success results and failures (== assertion failures?), and didn't see "errors" (other exceptions) and test process crashes. Fixed it. Now it also returns an error status code if there was a test failure. Bug 64292779 Test: manual Change-Id: Iaba93910d32abfc615ae595746a0e9be1108583a
Diffstat (limited to 'cmds/am/src')
-rw-r--r--cmds/am/src/com/android/commands/am/Instrument.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmds/am/src/com/android/commands/am/Instrument.java b/cmds/am/src/com/android/commands/am/Instrument.java
index c6d83f51a40a..b69ef1c2fca5 100644
--- a/cmds/am/src/com/android/commands/am/Instrument.java
+++ b/cmds/am/src/com/android/commands/am/Instrument.java
@@ -152,7 +152,7 @@ public class Instrument {
System.out.println(pretty);
} else {
if (results != null) {
- for (String key : results.keySet()) {
+ for (String key : sorted(results.keySet())) {
System.out.println(
"INSTRUMENTATION_RESULT: " + key + "=" + results.get(key));
}
@@ -163,6 +163,10 @@ public class Instrument {
@Override
public void onError(String errorText, boolean commandError) {
+ if (mRawMode) {
+ System.out.println("onError: commandError=" + commandError + " message="
+ + errorText);
+ }
// The regular BaseCommand error printing will print the commandErrors.
if (!commandError) {
System.out.println(errorText);