Skip to content

Commit

Permalink
Update to get more information on coverage history
Browse files Browse the repository at this point in the history
  • Loading branch information
TimSVector committed Jan 30, 2023
1 parent 2ee8ad0 commit c5e4131
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ public boolean performImpl(Run<?, ?> run, FilePath workspace, TaskListener liste
final VectorCASTBuildAction action = VectorCASTBuildAction.load(run, rule, healthReports, streams); //reports);

if (action.getBuildHealth() != null) {
logger.println("**[VectorCASTCoverage] [INFO]: " + action.getBuildHealth().getDescription());
logger.println("**[VectorCASTCoverage] [INFO]: Current Coverage : " + action.getBuildHealth().getDescription());
} else {
logger.println("**[VectorCASTCoverage] [INFO]: No thresholds set");
}
Expand All @@ -318,7 +318,9 @@ public boolean performImpl(Run<?, ?> run, FilePath workspace, TaskListener liste
if (useCoverageHistory) {
VectorCASTProjectAction vcProjAction = new VectorCASTProjectAction (run.getParent());
VectorCASTBuildAction historyAction = vcProjAction.getPreviousNotFailedBuild();
if (historyAction != null) {
if (historyAction != null) {
logger.println("**[VectorCASTCoverage] [INFO]: Previous Coverage: " + historyAction.getBuildHealth().getDescription());

float prevStCov = 0.0f;
float currStCov = 0.0f;
float currBrCov = 0.0f;
Expand All @@ -340,7 +342,6 @@ public boolean performImpl(Run<?, ?> run, FilePath workspace, TaskListener liste
} else {
logger.println("**[VectorCASTCoverage] [INFO]: code coverage history enforcement passed.");
}

logger.println("**[VectorCASTCoverage] [INFO] Previous (st/br): " + String.format(" %.02f /", prevStCov) + String.format(" %.02f", prevBrCov));
logger.println("**[VectorCASTCoverage] [INFO] Current (st/br): " + String.format(" %.02f /", currStCov) + String.format(" %.02f", currBrCov));
} else {
Expand Down

0 comments on commit c5e4131

Please sign in to comment.