@@ -37,15 +37,17 @@ grpc::Status CoverageAndResultsGenerator::generate(bool withCoverage,
3737 }
3838 } catch (CoverageGenerationException &e) {
3939 showErrors ();
40+ fs::remove (Paths::getGTestResultsJsonPath (projectContext));
4041 return Status (StatusCode::FAILED_PRECONDITION, e.what ());
4142 } catch (ExecutionProcessException &e) {
4243 exceptions.emplace_back (e);
4344 showErrors ();
45+ fs::remove (Paths::getGTestResultsJsonPath (projectContext));
4446 return Status (StatusCode::FAILED_PRECONDITION, e.what ());
4547 } catch (CancellationException &e) {
48+ fs::remove (Paths::getGTestResultsJsonPath (projectContext));
4649 return Status::CANCELLED;
4750 }
48-
4951 showErrors ();
5052 return Status::OK;
5153}
@@ -65,7 +67,7 @@ void CoverageAndResultsGenerator::showErrors() const {
6567 errorMessage = message;
6668 }
6769
68- coverageAndResultsWriter->writeResponse (testStatusMap , coverageMap, totals, errorMessage);
70+ coverageAndResultsWriter->writeResponse (projectContext, testResultMap , coverageMap, totals, errorMessage);
6971}
7072
7173Coverage::CoverageMap const &CoverageAndResultsGenerator::getCoverageMap () {
@@ -83,7 +85,7 @@ void CoverageAndResultsGenerator::collectCoverage() {
8385 }
8486 std::vector<ShellExecTask> coverageCommands = coverageTool->getCoverageCommands (
8587 CollectionUtils::filterToVector (testsToLaunch, [this ](const UnitTest &testToLaunch) {
86- return testStatusMap [testToLaunch.testFilePath ][testToLaunch.testname ] !=
88+ return testResultMap [testToLaunch.testFilePath ][testToLaunch.testname ]. status () !=
8789 testsgen::TEST_INTERRUPTED;
8890 }));
8991 if (coverageCommands.empty ()) {
0 commit comments