Skip to content

Commit

Permalink
[FIXED JENKINS-37623] Tolerate failed builds when generating tooltips.
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladislav Ponomarev committed Sep 10, 2016
1 parent a919323 commit 6cde4f7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/java/org/tap4j/plugin/TapProjectAction.java
Expand Up @@ -249,6 +249,17 @@ protected void populateDataSetBuilder(DataSetBuilder<String, ChartUtil.NumberOnl
Job<?, ?> p = this.job;

for (Run<?, ?> build = this.job.getLastBuild(); build != null; build = build.getPreviousBuild()) {

/*
* The build has most likely failed before any TAP data was recorded.
*
* If we don't exclude such builds, we'd have to account for that in GraphHelper. Besides that, it's not
* consistent with JUnit graph behaviour where builds without test results are not included in graph.
*/
if (build.getAction(TapBuildAction.class) == null) {
continue;
}

ChartUtil.NumberOnlyBuildLabel label = new ChartUtil.NumberOnlyBuildLabel((Run) build);

Result r = new Result();
Expand Down

0 comments on commit 6cde4f7

Please sign in to comment.