From 1472a9038a93df3b4d0d64eb3f8c309ef2583dc6 Mon Sep 17 00:00:00 2001 From: Brett Chabot Date: Fri, 29 Aug 2014 19:03:25 -0700 Subject: Handle ignored + assumption failure Also fix eclipse classpath Bug: 16684768 Change-Id: Ic699525d5dc81e74fdc28fe9b81a91c41c9151b8 --- .../internal/runner/listener/InstrumentationResultPrinter.java | 9 +++++++-- support/tests/.classpath | 2 +- support/tests/.project | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/support/src/android/support/test/internal/runner/listener/InstrumentationResultPrinter.java b/support/src/android/support/test/internal/runner/listener/InstrumentationResultPrinter.java index c913abc..0c45c3b 100644 --- a/support/src/android/support/test/internal/runner/listener/InstrumentationResultPrinter.java +++ b/support/src/android/support/test/internal/runner/listener/InstrumentationResultPrinter.java @@ -79,6 +79,11 @@ public class InstrumentationResultPrinter extends InstrumentationRunListener { * The test was ignored. */ public static final int REPORT_VALUE_RESULT_IGNORED = -3; + /** + * The test completed with an assumption failure. + */ + public static final int REPORT_VALUE_RESULT_ASSUMPTION_FAILURE = -4; + /** * If included in the status bundle sent to an IInstrumentationWatcher, this key * identifies a stack trace describing an error or failure. This is sent with any status @@ -141,14 +146,14 @@ public class InstrumentationResultPrinter extends InstrumentationRunListener { @Override public void testFailure(Failure failure) throws Exception { - mTestResultCode = REPORT_VALUE_RESULT_ERROR; + mTestResultCode = REPORT_VALUE_RESULT_FAILURE; reportFailure(failure); } @Override public void testAssumptionFailure(Failure failure) { - mTestResultCode = REPORT_VALUE_RESULT_FAILURE; + mTestResultCode = REPORT_VALUE_RESULT_ASSUMPTION_FAILURE; reportFailure(failure); } diff --git a/support/tests/.classpath b/support/tests/.classpath index 730d799..1d411a2 100644 --- a/support/tests/.classpath +++ b/support/tests/.classpath @@ -5,7 +5,7 @@ - + diff --git a/support/tests/.project b/support/tests/.project index 6608212..9f3c1a8 100644 --- a/support/tests/.project +++ b/support/tests/.project @@ -34,7 +34,7 @@ android-support-test-src 2 - ANDROID_TOP/frameworks/testing/support/src + ANDROID_TOP/frameworks/testing/support/lib/src dexmaker-dx-src -- cgit v1.2.3