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

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

Issue 1982493002: [Android] Log uncaught Java exceptions when running native tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix findbugs warning Created 4 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
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 a7443134cb3431c0cc22ea81a4087f2b6261ed6b..f834d334e636a29c754b5b66619bf59c78b82772 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
@@ -168,6 +168,14 @@ public class NativeTestInstrumentationTestRunner extends Instrumentation {
}
mHandler.post(new ShardEnder(pid));
}
+
+ @Override
+ public void uncaughtException(int pid, String stackTrace) {
+ mLogBundle.putString(Instrumentation.REPORT_KEY_STREAMRESULT,
+ String.format("Uncaught exception in test process (pid: %d)%n%s%n",
+ pid, stackTrace));
+ sendStatus(0, mLogBundle);
+ }
});
mHandler.post(new ShardStarter());

Powered by Google App Engine
This is Rietveld 408576698