diff options
author | Zack Galbreath <zack.galbreath@kitware.com> | 2016-11-08 20:36:29 (GMT) |
---|---|---|
committer | Zack Galbreath <zack.galbreath@kitware.com> | 2016-11-08 20:58:50 (GMT) |
commit | d3633731ab423b0627f86f94e6ff5fb932bbe76e (patch) | |
tree | fd6174ade802dc7fcb0271e8dc1bad42ada5cc18 /Source/cmCTest.cxx | |
parent | f725b20be36482f46364f17d18e528b5738d0e6a (diff) | |
download | CMake-d3633731ab423b0627f86f94e6ff5fb932bbe76e.zip CMake-d3633731ab423b0627f86f94e6ff5fb932bbe76e.tar.gz CMake-d3633731ab423b0627f86f94e6ff5fb932bbe76e.tar.bz2 |
Do not query CDash for version
This check was not functioning properly for the following reasons:
* The "DropSite" and "DropLocation" CTest Configurations do not
get set until ctest_submit() is called. So if ctest_submit()
was not called before ctest_test() we would end up with uncompressed
output, even if the CDash server was new enough to support this feature.
* CDash's API is now versioned. The current location to query is
now /api/v1/getversion.php, not /api/getversion.php.
As a result of these issues, CTest would not compress test/memcheck
output when it should. Rather than fix this check, we now assume that
CTest is communicating with a new enough version of CDash. This behavior
can be controlled through the use of the --no-compress-output command-line
argument.
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r-- | Source/cmCTest.cxx | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 010fc4e..f35a0b3 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -271,7 +271,6 @@ cmCTest::cmCTest() this->UseHTTP10 = false; this->PrintLabels = false; this->CompressTestOutput = true; - this->CompressMemCheckOutput = true; this->TestModel = cmCTest::EXPERIMENTAL; this->MaxTestNameWidth = 30; this->InteractiveDebugMode = true; @@ -289,8 +288,6 @@ cmCTest::cmCTest() this->DartVersion = 1; this->DropSiteCDash = false; this->OutputTestOutputOnTestFailure = false; - this->ComputedCompressTestOutput = false; - this->ComputedCompressMemCheckOutput = false; this->RepeatTests = 1; // default to run each test once this->RepeatUntilFail = false; std::string outOnFail; @@ -358,53 +355,9 @@ void cmCTest::SetTestLoad(unsigned long load) bool cmCTest::ShouldCompressTestOutput() { - if (!this->ComputedCompressTestOutput) { - std::string cdashVersion = this->GetCDashVersion(); - // version >= 1.6? - bool cdashSupportsGzip = cmSystemTools::VersionCompare( - cmSystemTools::OP_GREATER_EQUAL, cdashVersion.c_str(), "1.6"); - this->CompressTestOutput &= cdashSupportsGzip; - this->ComputedCompressTestOutput = true; - } return this->CompressTestOutput; } -bool cmCTest::ShouldCompressMemCheckOutput() -{ - if (!this->ComputedCompressMemCheckOutput) { - std::string cdashVersion = this->GetCDashVersion(); - - bool compressionSupported = cmSystemTools::VersionCompare( - cmSystemTools::OP_GREATER, cdashVersion.c_str(), "1.9.0"); - this->CompressMemCheckOutput &= compressionSupported; - this->ComputedCompressMemCheckOutput = true; - } - return this->CompressMemCheckOutput; -} - -std::string cmCTest::GetCDashVersion() -{ -#ifdef CMAKE_BUILD_WITH_CMAKE - // First query the server. If that fails, fall back to the local setting - std::string response; - std::string url = "http://"; - url += this->GetCTestConfiguration("DropSite"); - - std::string cdashUri = this->GetCTestConfiguration("DropLocation"); - cdashUri = cdashUri.substr(0, cdashUri.find("/submit.php")); - - int res = 1; - if (!cdashUri.empty()) { - url += cdashUri + "/api/getversion.php"; - res = cmCTest::HTTPRequest(url, cmCTest::HTTP_GET, response, "", "", 3); - } - - return res ? this->GetCTestConfiguration("CDashVersion") : response; -#else - return this->GetCTestConfiguration("CDashVersion"); -#endif -} - cmCTest::Part cmCTest::GetPartFromName(const char* name) { // Look up by lower-case to make names case-insensitive. @@ -1746,7 +1699,6 @@ bool cmCTest::HandleCommandLineArguments(size_t& i, if (this->CheckArgument(arg, "--no-compress-output")) { this->CompressTestOutput = false; - this->CompressMemCheckOutput = false; } if (this->CheckArgument(arg, "--print-labels")) { |