Skip to content

Commit

Permalink
[JENKINS-19539] Do not (try to) generate coverage information if buil…
Browse files Browse the repository at this point in the history
…d was aborted
  • Loading branch information
mabako committed Sep 11, 2013
1 parent 43443ec commit acdd801
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/hudson/plugins/jacoco/JacocoBuildAction.java
Expand Up @@ -239,7 +239,7 @@ public JacocoBuildAction getPreviousResult() {
b = b.getPreviousBuild();
if(b==null)
return null;
if(b.getResult()== Result.FAILURE)
if(b.getResult()== Result.FAILURE || b.getResult() == Result.ABORTED)
continue;
JacocoBuildAction r = b.getAction(JacocoBuildAction.class);
if(r!=null)
Expand Down
Expand Up @@ -41,7 +41,7 @@ public String getUrlName() {
*/
public JacocoBuildAction getLastResult() {
for (AbstractBuild<?, ?> b = project.getLastBuild(); b != null; b = b.getPreviousBuild()) {
if (b.getResult() == Result.FAILURE)
if (b.getResult() == Result.FAILURE || b.getResult() == Result.ABORTED)
continue;
JacocoBuildAction r = b.getAction(JacocoBuildAction.class);
if (r != null)
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/hudson/plugins/jacoco/JacocoPublisher.java
Expand Up @@ -304,7 +304,7 @@ public boolean perform(AbstractBuild<?,?> build, Launcher launcher, BuildListene
FilePath[] matchedClassDirs = null;
FilePath[] matchedSrcDirs = null;

if (build.getResult().equals(Result.FAILURE)) {
if (build.getResult() == Result.FAILURE || build.getResult() == Result.ABORTED) {
return true;
}

Expand Down

0 comments on commit acdd801

Please sign in to comment.