diff options
author | Ken Martin <ken.martin@kitware.com> | 2004-03-25 21:06:11 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2004-03-25 21:06:11 (GMT) |
commit | afc74398d3534a5317f608e1c899f39a2a7feb7a (patch) | |
tree | 7ba112ea46e70f1dbe30eba2b6b948277f15b3fd /Source | |
parent | a109ba1365e608d11200470e4d3ee4b1fa24caed (diff) | |
download | CMake-afc74398d3534a5317f608e1c899f39a2a7feb7a.zip CMake-afc74398d3534a5317f608e1c899f39a2a7feb7a.tar.gz CMake-afc74398d3534a5317f608e1c899f39a2a7feb7a.tar.bz2 |
coverage change that will probably end in an infinite loop
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmCTest.cxx | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index e9dc574..f96366d 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -1600,10 +1600,31 @@ int cmCTest::CoverageDirectory() continue; } - // Check if we should ignore the directory + // Check if we should ignore the directory, if we find a NoDartCoverage + // file in it or any of its parents + int do_coverage = 1; std::string coverage_dir = cmSystemTools::GetFilenamePath(cov.m_AbsolutePath.c_str()); - coverage_dir += "/.NoDartCoverage"; - if ( cmSystemTools::FileExists(coverage_dir.c_str()) ) + do + { + std::string coverage_file = coverage_dir + "/.NoDartCoverage"; + if ( cmSystemTools::FileExists(coverage_file.c_str()) ) + { + do_coverage = 0; + break; + } + // is there a parent directory we can check + std::string::size_type pos = coverage_dir.rfind('/'); + // if we could not find the directory return 0 + if(pos == std::string::npos) + { + break; + } + coverage_dir = coverage_dir.substr(0, pos); + + } + while (coverage_dir.size() >= sourceDirectory.size()); + + if (!do_coverage) { if ( m_Verbose ) { @@ -1611,7 +1632,7 @@ int cmCTest::CoverageDirectory() } continue; } - + if ( ccount == 100 ) { local_end_time = ::CurrentTime(); |