summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Wilson <jessewilson@google.com>2009-11-18 13:33:48 -0800
committerJesse Wilson <jessewilson@google.com>2009-11-18 13:40:24 -0800
commit242798cc5c63592ecd4adc93a0ee368d827763f3 (patch)
tree19cfedf909b82ad8da5a232d050951a9acf7f339
parent4d942029d2027162419cc45c95263903d67270cc (diff)
downloadlibcore-242798cc5c63592ecd4adc93a0ee368d827763f3.zip
libcore-242798cc5c63592ecd4adc93a0ee368d827763f3.tar.gz
libcore-242798cc5c63592ecd4adc93a0ee368d827763f3.tar.bz2
Don't ignore errors on expected result, compile, or install in jtreg runner.
-rw-r--r--tools/dalvik_jtreg/java/dalvik/jtreg/JtregRunner.java23
1 files changed, 16 insertions, 7 deletions
diff --git a/tools/dalvik_jtreg/java/dalvik/jtreg/JtregRunner.java b/tools/dalvik_jtreg/java/dalvik/jtreg/JtregRunner.java
index 246d2d8..c6f2700 100644
--- a/tools/dalvik_jtreg/java/dalvik/jtreg/JtregRunner.java
+++ b/tools/dalvik_jtreg/java/dalvik/jtreg/JtregRunner.java
@@ -81,14 +81,23 @@ public final class JtregRunner {
// threads helps for packages that contain many unsupported tests
ExecutorService builders = Executors.newFixedThreadPool(8);
for (final TestDescription testDescription : tests) {
- builders.submit(new Callable<Void>() {
- public Void call() throws Exception {
+ builders.submit(new Runnable() {
+ public void run() {
String qualifiedName = TestDescriptions.qualifiedName(testDescription);
- ExpectedResult expectedResult = ExpectedResult.forRun(expectationDirs, qualifiedName);
- TestRun testRun = new TestRun(qualifiedName, testDescription, expectedResult);
- buildAndInstall(testRun);
- readyToRun.put(testRun);
- return null;
+ TestRun testRun;
+ try {
+ ExpectedResult expectedResult = ExpectedResult.forRun(expectationDirs, qualifiedName);
+ testRun = new TestRun(qualifiedName, testDescription, expectedResult);
+ buildAndInstall(testRun);
+ } catch (Throwable throwable) {
+ testRun = new TestRun(qualifiedName, testDescription, ExpectedResult.SUCCESS);
+ testRun.setResult(Result.ERROR, throwable);
+ }
+ try {
+ readyToRun.put(testRun);
+ } catch (InterruptedException e) {
+ logger.log(Level.SEVERE, "Unexpected interruption", e);
+ }
}
});
}