fixup! Generate and convert JUnit test reports for xunit-viewer
This commit is contained in:
parent
5b2090a231
commit
513fb0beb3
1 changed files with 11 additions and 1 deletions
|
@ -122,7 +122,13 @@ public class PitestOperationBuild extends Project {
|
|||
var testResultsDir = "build/test-results/test/";
|
||||
var op = testOperation().fromProject(this);
|
||||
op.testToolOptions().reportsDir(new File(testResultsDir));
|
||||
op.execute();
|
||||
|
||||
Exception ex = null;
|
||||
try {
|
||||
op.execute();
|
||||
} catch (Exception e) {
|
||||
ex = e;
|
||||
}
|
||||
|
||||
var xunitViewer = new File("/usr/bin/xunit-viewer");
|
||||
if (xunitViewer.exists() && xunitViewer.canExecute()) {
|
||||
|
@ -135,5 +141,9 @@ public class PitestOperationBuild extends Project {
|
|||
.command(xunitViewer.getPath(), "-r", testResultsDir, "-o", reportsDir + "index.html")
|
||||
.execute();
|
||||
}
|
||||
|
||||
if (ex != null) {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue