forked from jenkinsci/regression-report-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pass compilation, but still have four test failures
- Loading branch information
Showing
4 changed files
with
46 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 8 additions & 3 deletions
11
src/main/java/jp/skypencil/jenkins/regression/RegressionPredicate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
package jp.skypencil.jenkins.regression; | ||
|
||
import hudson.tasks.junit.CaseResult; | ||
import hudson.tasks.test.TestResult; | ||
|
||
import com.google.common.base.Predicate; | ||
|
||
class RegressionPredicate implements Predicate<CaseResult> { | ||
class RegressionPredicate implements Predicate<TestResult> { | ||
@Override | ||
public boolean apply(CaseResult input) { | ||
return input.getStatus().isRegression(); | ||
public boolean apply(TestResult input) { | ||
if (input instanceof CaseResult) { | ||
CaseResult caseResult = (CaseResult) input; | ||
return caseResult.getStatus().isRegression(); | ||
} | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/main/java/jp/skypencil/jenkins/regression/TestResultToCaseResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package jp.skypencil.jenkins.regression; | ||
|
||
import hudson.tasks.junit.CaseResult; | ||
import hudson.tasks.test.TestResult; | ||
|
||
import com.google.common.base.Function; | ||
|
||
class TestResultToCaseResult implements Function<TestResult, CaseResult> { | ||
@Override | ||
public CaseResult apply(TestResult input) { | ||
return (CaseResult) input; | ||
} | ||
} |