Skip to content
Permalink
Browse files

Merge pull request #28 from mabako/cancel-aborted-builds

[JENKINS-19539] Generate no coverage for aborted builds
  • Loading branch information...
ognjenb committed Sep 16, 2013
2 parents e57b726 + acdd801 commit 3a9f2f3d8483726f9a4d82621f8e6820e2dad6b3
@@ -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)
@@ -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)
@@ -307,7 +307,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;
}

0 comments on commit 3a9f2f3

Please sign in to comment.
You can’t perform that action at this time.