@@ -37,15 +37,17 @@ grpc::Status CoverageAndResultsGenerator::generate(bool withCoverage,
37
37
}
38
38
} catch (CoverageGenerationException &e) {
39
39
showErrors ();
40
+ fs::remove (Paths::getGTestResultsJsonPath (projectContext));
40
41
return Status (StatusCode::FAILED_PRECONDITION, e.what ());
41
42
} catch (ExecutionProcessException &e) {
42
43
exceptions.emplace_back (e);
43
44
showErrors ();
45
+ fs::remove (Paths::getGTestResultsJsonPath (projectContext));
44
46
return Status (StatusCode::FAILED_PRECONDITION, e.what ());
45
47
} catch (CancellationException &e) {
48
+ fs::remove (Paths::getGTestResultsJsonPath (projectContext));
46
49
return Status::CANCELLED;
47
50
}
48
-
49
51
showErrors ();
50
52
return Status::OK;
51
53
}
@@ -65,7 +67,7 @@ void CoverageAndResultsGenerator::showErrors() const {
65
67
errorMessage = message;
66
68
}
67
69
68
- coverageAndResultsWriter->writeResponse (testStatusMap , coverageMap, totals, errorMessage);
70
+ coverageAndResultsWriter->writeResponse (projectContext, testResultMap , coverageMap, totals, errorMessage);
69
71
}
70
72
71
73
Coverage::CoverageMap const &CoverageAndResultsGenerator::getCoverageMap () {
@@ -83,7 +85,7 @@ void CoverageAndResultsGenerator::collectCoverage() {
83
85
}
84
86
std::vector<ShellExecTask> coverageCommands = coverageTool->getCoverageCommands (
85
87
CollectionUtils::filterToVector (testsToLaunch, [this ](const UnitTest &testToLaunch) {
86
- return testStatusMap [testToLaunch.testFilePath ][testToLaunch.testname ] !=
88
+ return testResultMap [testToLaunch.testFilePath ][testToLaunch.testname ]. status () !=
87
89
testsgen::TEST_INTERRUPTED;
88
90
}));
89
91
if (coverageCommands.empty ()) {
0 commit comments