Skip to content

Commit

Permalink
Exit with non-zero status if one or more Java tests fail
Browse files Browse the repository at this point in the history
  • Loading branch information
adamretter committed Sep 18, 2015
1 parent 1b59821 commit 7d937a0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions java/src/test/java/org/rocksdb/test/RocksJunitRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.junit.internal.TextListener;
import org.junit.runner.Description;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;

import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -56,8 +57,10 @@ public static void main(String[] args){
for (String arg : args) {
classes.add(Class.forName(arg));
}
runner.run(classes.toArray(new Class[1]));

final Result result = runner.run(classes.toArray(new Class[1]));
if(!result.wasSuccessful()) {
System.exit(-1);
}
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
Expand Down

0 comments on commit 7d937a0

Please sign in to comment.