[Cmake-commits] CMake branch, next, updated. v3.7.0-rc3-1034-g8d3f851

Brad King brad.king at kitware.com
Thu Nov 10 08:48:21 EST 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  8d3f8512d1b8df0f9f0cf0f27b87d2ff5e769158 (commit)
       via  d3633731ab423b0627f86f94e6ff5fb932bbe76e (commit)
       via  f725b20be36482f46364f17d18e528b5738d0e6a (commit)
      from  fefc91b1244d4040795245a1d16e6acfaebef016 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8d3f8512d1b8df0f9f0cf0f27b87d2ff5e769158
commit 8d3f8512d1b8df0f9f0cf0f27b87d2ff5e769158
Merge: fefc91b d363373
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Nov 10 08:48:19 2016 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Nov 10 08:48:19 2016 -0500

    Merge topic 'cdash_version_check' into next
    
    d3633731 Do not query CDash for version
    f725b20b Update tests that expect uncompressed output


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d3633731ab423b0627f86f94e6ff5fb932bbe76e
commit d3633731ab423b0627f86f94e6ff5fb932bbe76e
Author:     Zack Galbreath <zack.galbreath at kitware.com>
AuthorDate: Tue Nov 8 15:36:29 2016 -0500
Commit:     Zack Galbreath <zack.galbreath at kitware.com>
CommitDate: Tue Nov 8 15:58:50 2016 -0500

    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.

diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx
index 0052a16..1210d8a 100644
--- a/Source/CTest/cmCTestMemCheckHandler.cxx
+++ b/Source/CTest/cmCTestMemCheckHandler.cxx
@@ -354,7 +354,7 @@ void cmCTestMemCheckHandler::GenerateDartOutput(cmXMLWriter& xml)
     xml.EndElement(); // Results
 
     xml.StartElement("Log");
-    if (this->CTest->ShouldCompressMemCheckOutput()) {
+    if (this->CTest->ShouldCompressTestOutput()) {
       this->CTest->CompressString(memcheckstr);
       xml.Attribute("compression", "gzip");
       xml.Attribute("encoding", "base64");
diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx
index b30f6eb..fbc94cc 100644
--- a/Source/CTest/cmCTestRunTest.cxx
+++ b/Source/CTest/cmCTestRunTest.cxx
@@ -153,7 +153,7 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started)
   if ((!this->TestHandler->MemCheck &&
        this->CTest->ShouldCompressTestOutput()) ||
       (this->TestHandler->MemCheck &&
-       this->CTest->ShouldCompressMemCheckOutput())) {
+       this->CTest->ShouldCompressTestOutput())) {
     this->CompressOutput();
   }
 
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index d10f7ad..8383132 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -46,7 +46,6 @@ public:
   };
 
   StatusType Status;
-  std::string CDashVersion;
   std::string Filename;
   std::string MD5;
   std::string Message;
@@ -63,12 +62,10 @@ private:
     return val;
   }
 
-  void StartElement(const std::string& name, const char** atts) CM_OVERRIDE
+  void StartElement(const std::string& /*name*/,
+                    const char** /*atts*/) CM_OVERRIDE
   {
     this->CurrentValue.clear();
-    if (name == "cdash") {
-      this->CDashVersion = this->FindAttribute(atts, "version");
-    }
   }
 
   void CharacterDataHandler(const char* data, int length) CM_OVERRIDE
@@ -470,20 +467,6 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
       // Now run off and do what you've been told!
       res = ::curl_easy_perform(curl);
 
-      if (cmSystemTools::IsOn(this->GetOption("InternalTest")) &&
-          cmSystemTools::VersionCompare(cmSystemTools::OP_LESS,
-                                        this->CTest->GetCDashVersion().c_str(),
-                                        "1.7")) {
-        // mock failure output for internal test case
-        std::string mock_output =
-          "<cdash version=\"1.7.0\">\n"
-          "  <status>ERROR</status>\n"
-          "  <message>Checksum failed for file.</message>\n"
-          "</cdash>\n";
-        chunk.clear();
-        chunk.assign(mock_output.begin(), mock_output.end());
-      }
-
       if (!chunk.empty()) {
         cmCTestOptionalLog(this->CTest, DEBUG, "CURL output: ["
                              << cmCTestLogWrite(&*chunk.begin(), chunk.size())
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")) {
diff --git a/Source/cmCTest.h b/Source/cmCTest.h
index 8d3f8fb..e5b4728 100644
--- a/Source/cmCTest.h
+++ b/Source/cmCTest.h
@@ -232,11 +232,8 @@ public:
   bool ShouldPrintLabels() { return this->PrintLabels; }
 
   bool ShouldCompressTestOutput();
-  bool ShouldCompressMemCheckOutput();
   bool CompressString(std::string& str);
 
-  std::string GetCDashVersion();
-
   std::string GetStopTime() { return this->StopTime; }
   void SetStopTime(std::string const& time);
 
@@ -487,10 +484,6 @@ private:
 
   bool RunConfigurationScript;
 
-  // flag for lazy getter (optimization)
-  bool ComputedCompressTestOutput;
-  bool ComputedCompressMemCheckOutput;
-
   int GenerateNotesFile(const char* files);
 
   void DetermineNextDayStop();
@@ -547,7 +540,6 @@ private:
 
   bool CompressXMLFiles;
   bool CompressTestOutput;
-  bool CompressMemCheckOutput;
 
   void InitStreams();
   std::ostream* StreamOut;

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f725b20be36482f46364f17d18e528b5738d0e6a
commit f725b20be36482f46364f17d18e528b5738d0e6a
Author:     Zack Galbreath <zack.galbreath at kitware.com>
AuthorDate: Tue Nov 8 15:36:17 2016 -0500
Commit:     Zack Galbreath <zack.galbreath at kitware.com>
CommitDate: Tue Nov 8 15:58:29 2016 -0500

    Update tests that expect uncompressed output
    
    Pass --no-compressed-output to ctest for tests that expect uncompressed output.

diff --git a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
index 2bc3693..e936dab 100644
--- a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
@@ -135,6 +135,7 @@ function(run_TestOutputSize)
 ")
   run_cmake_command(TestOutputSize
     ${CMAKE_CTEST_COMMAND} -M Experimental -T Test
+                           --no-compress-output
                            --test-output-size-passed 10
                            --test-output-size-failed 12
     )
diff --git a/Tests/RunCMake/RunCTest.cmake b/Tests/RunCMake/RunCTest.cmake
index e94432b..89e16ee 100644
--- a/Tests/RunCMake/RunCTest.cmake
+++ b/Tests/RunCMake/RunCTest.cmake
@@ -12,6 +12,7 @@ function(run_ctest CASE_NAME)
     -S ${RunCMake_BINARY_DIR}/${CASE_NAME}/test.cmake
     -V
     --output-log ${RunCMake_BINARY_DIR}/${CASE_NAME}-build/testOutput.log
+    --no-compress-output
     ${ARGN}
     )
 endfunction()

-----------------------------------------------------------------------

Summary of changes:
 Source/CTest/cmCTestMemCheckHandler.cxx            |    2 +-
 Source/CTest/cmCTestRunTest.cxx                    |    2 +-
 Source/CTest/cmCTestSubmitHandler.cxx              |   21 +--------
 Source/cmCTest.cxx                                 |   48 --------------------
 Source/cmCTest.h                                   |    8 ----
 Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake |    1 +
 Tests/RunCMake/RunCTest.cmake                      |    1 +
 7 files changed, 6 insertions(+), 77 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list