summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
authorZach Mullen <zach.mullen@kitware.com>2009-12-21 17:27:04 (GMT)
committerZach Mullen <zach.mullen@kitware.com>2009-12-21 17:27:04 (GMT)
commit7af553188ec50c976a5d0c8174d2f47cac68d71d (patch)
tree65158f6a94f6707bbdb60060c9d8f1fd5b779b7e /Source/cmCTest.cxx
parentcb27cfb1cc6d8a273f69506414c2991b6c989621 (diff)
downloadCMake-7af553188ec50c976a5d0c8174d2f47cac68d71d.zip
CMake-7af553188ec50c976a5d0c8174d2f47cac68d71d.tar.gz
CMake-7af553188ec50c976a5d0c8174d2f47cac68d71d.tar.bz2
Added support for CTest awareness of the CDash version. This will help forward compatibility for both tools. Note that this changeset effectively makes the default to disable output compression. Now, to enable output compression, the CDASH_CTEST_VERSION must be explicity set to >= 1.6. Automated detection of the CDash version is the next step.
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 25a80ff..cf2907e 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -222,6 +222,7 @@ cmCTest::cmCTest()
this->RunConfigurationScript = false;
this->UseHTTP10 = false;
this->CompressTestOutput = true;
+ this->ComputedCompressOutput = false;
this->TestModel = cmCTest::EXPERIMENTAL;
this->MaxTestNameWidth = 30;
this->InteractiveDebugMode = true;
@@ -300,6 +301,24 @@ void cmCTest::SetParallelLevel(int level)
}
//----------------------------------------------------------------------------
+bool cmCTest::ShouldCompressTestOutput()
+{
+ if(!this->ComputedCompressOutput)
+ {
+ std::string cdashVersion =
+ this->GetCTestConfiguration("CDashVersion");
+ //version >= 1.6?
+ bool cdashSupportsGzip = cmSystemTools::VersionCompare(
+ cmSystemTools::OP_GREATER, cdashVersion.c_str(), "1.6") ||
+ cmSystemTools::VersionCompare(cmSystemTools::OP_EQUAL,
+ cdashVersion.c_str(), "1.6");
+ this->CompressTestOutput &= cdashSupportsGzip;
+ this->ComputedCompressOutput = true;
+ }
+ return this->CompressTestOutput;
+}
+
+//----------------------------------------------------------------------------
cmCTest::Part cmCTest::GetPartFromName(const char* name)
{
// Look up by lower-case to make names case-insensitive.