From 5bc17136a36f837970d2d6fa83ce0bf84157b321 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 11 Mar 2009 13:31:33 -0400 Subject: [PATCH] BUG: Do not carry over file list between coverage When performing multiple ctest_coverage() commands in a single CTest instance we need to clear the list of CoverageLog-*.xml files for submission. Otherwise if the current coverage run produces fewer log files than the previous run CTest will attempt to submit non-existing files. --- Source/CTest/cmCTestCoverageHandler.cxx | 1 + Source/cmCTest.h | 1 + 2 files changed, 2 insertions(+) diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index fe4e2bf21..59c91ecb8 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -334,6 +334,7 @@ bool cmCTestCoverageHandler::ShouldIDoCoverage(const char* file, //functions and commented... int cmCTestCoverageHandler::ProcessHandler() { + this->CTest->ClearSubmitFiles(cmCTest::PartCoverage); int error = 0; // do we have time for this if (this->CTest->GetRemainingTimeAllowed() < 120) diff --git a/Source/cmCTest.h b/Source/cmCTest.h index 5e1612ec4..5eca3c3bf 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -358,6 +358,7 @@ public: void AddSubmitFile(Part part, const char* name); std::vector const& GetSubmitFiles(Part part) { return this->Parts[part].SubmitFiles; } + void ClearSubmitFiles(Part part) { this->Parts[part].SubmitFiles.clear(); } //! Read the custom configuration files and apply them to the current ctest int ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf);