summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmParsePythonCoverage.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CTest/cmParsePythonCoverage.cxx')
-rw-r--r--Source/CTest/cmParsePythonCoverage.cxx20
1 files changed, 13 insertions, 7 deletions
diff --git a/Source/CTest/cmParsePythonCoverage.cxx b/Source/CTest/cmParsePythonCoverage.cxx
index 2578bb8..68a6817 100644
--- a/Source/CTest/cmParsePythonCoverage.cxx
+++ b/Source/CTest/cmParsePythonCoverage.cxx
@@ -33,19 +33,25 @@ protected:
<< atts[tagCount+1] << std::endl);
this->CurFileName = this->Coverage.SourceDir + "/" +
atts[tagCount+1];
- FileLinesType& curFileLines =
- this->Coverage.TotalCoverage[this->CurFileName];
cmsys::ifstream fin(this->CurFileName.c_str());
if(!fin)
{
- cmCTestLog(this->CTest, ERROR_MESSAGE,
- "Python Coverage: Error opening " << this->CurFileName
- << std::endl);
- this->Coverage.Error++;
- break;
+ this->CurFileName = this->Coverage.BinaryDir + "/" +
+ atts[tagCount+1];
+ fin.open(this->CurFileName.c_str());
+ if (!fin)
+ {
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Python Coverage: Error opening " << this->CurFileName
+ << std::endl);
+ this->Coverage.Error++;
+ break;
+ }
}
std::string line;
+ FileLinesType& curFileLines =
+ this->Coverage.TotalCoverage[this->CurFileName];
curFileLines.push_back(-1);
while(cmSystemTools::GetLineFromStream(fin, line))
{