summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2004-04-19 21:21:11 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2004-04-19 21:21:11 (GMT)
commit30d4262dadad5dc1ac6bf6d138a47b7e27de659c (patch)
tree04cfe60f65aaec3688474317cde75763c578a61d
parentd4214bc5659e3f80b530b9e253525ae156618cb5 (diff)
downloadCMake-30d4262dadad5dc1ac6bf6d138a47b7e27de659c.zip
CMake-30d4262dadad5dc1ac6bf6d138a47b7e27de659c.tar.gz
CMake-30d4262dadad5dc1ac6bf6d138a47b7e27de659c.tar.bz2
RNH: Support NoDartCoverage in the binary directorory
-rw-r--r--Source/cmCTest.cxx29
1 files changed, 27 insertions, 2 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 3aa1e67..59deb91 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -1499,6 +1499,31 @@ int cmCTest::CoverageDirectory()
for ( cc = 0; cc < gfiles.size(); cc ++ )
{
+ int do_coverage = 1;
+ std::string coverage_dir = cmSystemTools::GetFilenamePath(gfiles[cc].c_str());
+ std::string builDir = m_DartConfiguration["BuildDirectory"];
+ 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() >= builDir.size());
+ if ( !do_coverage )
+ {
+ continue;
+ }
//std::cout << "\t" << gfiles[cc] << std::endl;
std::ifstream ifile(gfiles[cc].c_str());
if ( !ifile )
@@ -1620,10 +1645,10 @@ int cmCTest::CoverageDirectory()
break;
}
coverage_dir = coverage_dir.substr(0, pos);
-
+
}
while (coverage_dir.size() >= sourceDirectory.size());
-
+
if (!do_coverage)
{
if ( m_Verbose )