diff options
Diffstat (limited to 'ddms')
-rw-r--r-- | ddms/libs/ddmlib/src/com/android/ddmlib/testrunner/InstrumentationResultParser.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/testrunner/InstrumentationResultParser.java b/ddms/libs/ddmlib/src/com/android/ddmlib/testrunner/InstrumentationResultParser.java index 4819fbc..a986380 100644 --- a/ddms/libs/ddmlib/src/com/android/ddmlib/testrunner/InstrumentationResultParser.java +++ b/ddms/libs/ddmlib/src/com/android/ddmlib/testrunner/InstrumentationResultParser.java @@ -565,10 +565,19 @@ public class InstrumentationResultParser extends MultiLineReceiver { @Override public void done() { super.done(); - if (!mTestRunFailReported && !mTestStartReported && !mTestRunFinished) { + if (!mTestRunFailReported) { + handleOutputDone(); + } + } + + /** + * Handles the end of the adb session when a test run failure has not been reported yet + */ + private void handleOutputDone() { + if (!mTestStartReported && !mTestRunFinished) { // no results handleTestRunFailed(NO_TEST_RESULTS_MSG); - } else if (!mTestRunFailReported && mNumTestsExpected > mNumTestsRun) { + } else if (mNumTestsExpected > mNumTestsRun) { final String message = String.format("%s. Expected %d tests, received %d", INCOMPLETE_RUN_ERR_MSG_PREFIX, mNumTestsExpected, mNumTestsRun); |