@@ -37,16 +37,19 @@ 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 ();
52
+ fs::remove (Paths::getGTestResultsJsonPath (projectContext));
50
53
return Status::OK;
51
54
}
52
55
@@ -65,7 +68,7 @@ void CoverageAndResultsGenerator::showErrors() const {
65
68
errorMessage = message;
66
69
}
67
70
68
- coverageAndResultsWriter->writeResponse (testStatusMap , coverageMap, totals, errorMessage);
71
+ coverageAndResultsWriter->writeResponse (projectContext, testResultMap , coverageMap, totals, errorMessage);
69
72
}
70
73
71
74
Coverage::CoverageMap const &CoverageAndResultsGenerator::getCoverageMap () {
@@ -83,7 +86,7 @@ void CoverageAndResultsGenerator::collectCoverage() {
83
86
}
84
87
std::vector<ShellExecTask> coverageCommands = coverageTool->getCoverageCommands (
85
88
CollectionUtils::filterToVector (testsToLaunch, [this ](const UnitTest &testToLaunch) {
86
- return testStatusMap [testToLaunch.testFilePath ][testToLaunch.testname ] !=
89
+ return testResultMap [testToLaunch.testFilePath ][testToLaunch.testname ]. status () !=
87
90
testsgen::TEST_INTERRUPTED;
88
91
}));
89
92
if (coverageCommands.empty ()) {
0 commit comments