Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Unified Diff: testing/android/native_test/java/src/org/chromium/native_test/NativeTestInstrumentationTestRunner.java

Issue 1023803002: Enable ouputting results for passed tests on AMP. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/pylib/remote/device/remote_device_gtest_run.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/android/native_test/java/src/org/chromium/native_test/NativeTestInstrumentationTestRunner.java
diff --git a/testing/android/native_test/java/src/org/chromium/native_test/NativeTestInstrumentationTestRunner.java b/testing/android/native_test/java/src/org/chromium/native_test/NativeTestInstrumentationTestRunner.java
index c5a4443e1a4c1c6122638dc793aab6691397f92d..2f6bdade211417e1059d4c9c03e18c768bd1a554 100644
--- a/testing/android/native_test/java/src/org/chromium/native_test/NativeTestInstrumentationTestRunner.java
+++ b/testing/android/native_test/java/src/org/chromium/native_test/NativeTestInstrumentationTestRunner.java
@@ -31,10 +31,6 @@ import java.util.regex.Pattern;
* An Instrumentation that runs tests based on NativeTestActivity.
*/
public class NativeTestInstrumentationTestRunner extends Instrumentation {
- // TODO(jbudorick): Remove this extra when b/18981674 is fixed.
- public static final String EXTRA_ONLY_OUTPUT_FAILURES =
- "org.chromium.native_test.NativeTestInstrumentationTestRunner."
- + "OnlyOutputFailures";
private static final String TAG = Log.makeTag("native_test");
@@ -46,7 +42,6 @@ public class NativeTestInstrumentationTestRunner extends Instrumentation {
private File mStdoutFile;
private Bundle mLogBundle;
private ResultsBundleGenerator mBundleGenerator;
- private boolean mOnlyOutputFailures;
@Override
public void onCreate(Bundle arguments) {
@@ -63,7 +58,6 @@ public class NativeTestInstrumentationTestRunner extends Instrumentation {
}
mLogBundle = new Bundle();
mBundleGenerator = new RobotiumBundleGenerator();
- mOnlyOutputFailures = arguments.containsKey(EXTRA_ONLY_OUTPUT_FAILURES);
start();
}
@@ -139,26 +133,17 @@ public class NativeTestInstrumentationTestRunner extends Instrumentation {
for (String l = r.readLine(); l != null && !l.equals("<<ScopedMainEntryLogger");
l = r.readLine()) {
Matcher m = RE_TEST_OUTPUT.matcher(l);
- boolean isFailure = false;
if (m.matches()) {
if (m.group(1).equals("RUN")) {
results.put(m.group(2), ResultsBundleGenerator.TestResult.UNKNOWN);
} else if (m.group(1).equals("FAILED")) {
results.put(m.group(2), ResultsBundleGenerator.TestResult.FAILED);
- isFailure = true;
- mLogBundle.putString(Instrumentation.REPORT_KEY_STREAMRESULT, l + "\n");
- sendStatus(0, mLogBundle);
} else if (m.group(1).equals("OK")) {
results.put(m.group(2), ResultsBundleGenerator.TestResult.PASSED);
}
}
-
- // TODO(jbudorick): mOnlyOutputFailures is a workaround for b/18981674. Remove it
- // once that issue is fixed.
- if (!mOnlyOutputFailures || isFailure) {
- mLogBundle.putString(Instrumentation.REPORT_KEY_STREAMRESULT, l + "\n");
- sendStatus(0, mLogBundle);
- }
+ mLogBundle.putString(Instrumentation.REPORT_KEY_STREAMRESULT, l + "\n");
+ sendStatus(0, mLogBundle);
Log.i(TAG, l);
}
} catch (FileNotFoundException e) {
« no previous file with comments | « build/android/pylib/remote/device/remote_device_gtest_run.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698