From da3a2955cc91a7f960b3fdf4e95f57a512f1b7c6 Mon Sep 17 00:00:00 2001 From: Mike Ma Date: Mon, 13 Nov 2017 12:06:45 -0800 Subject: [PATCH] Add instrumentation data to host proto lib Add instrumentation data proto to host proto lib and add a few comment to am instrument. Test: no test needed Change-Id: Ibbb0394dcf0ad27b53d5c97104456798863ce82c --- Android.mk | 1 + cmds/am/src/com/android/commands/am/Instrument.java | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/Android.mk b/Android.mk index 8fd63ee4632a7..b84742501eb6a 100644 --- a/Android.mk +++ b/Android.mk @@ -1558,6 +1558,7 @@ LOCAL_PROTOC_FLAGS := \ LOCAL_SOURCE_FILES_ALL_GENERATED := true LOCAL_SRC_FILES := \ tools/streaming_proto/stream.proto \ + cmds/am/proto/instrumentation_data.proto \ $(call all-proto-files-under, core/proto) \ $(call all-proto-files-under, libs/incident/proto) include $(BUILD_HOST_JAVA_LIBRARY) diff --git a/cmds/am/src/com/android/commands/am/Instrument.java b/cmds/am/src/com/android/commands/am/Instrument.java index 93b9f58d51d31..d79b1a61eb5bf 100644 --- a/cmds/am/src/com/android/commands/am/Instrument.java +++ b/cmds/am/src/com/android/commands/am/Instrument.java @@ -47,6 +47,16 @@ import java.util.Locale; /** * Runs the am instrument command + * + * Test Result Code: + * 1 - Test running + * 0 - Test passed + * -2 - assertion failure + * -1 - other exceptions + * + * Session Result Code: + * -1: Success + * other: Failure */ public class Instrument { public static final String DEFAULT_LOG_DIR = "instrument-logs";