From 41fcf6e1558cb3ef4639928f87d58531b45fe237 Mon Sep 17 00:00:00 2001 From: Zach Mullen Date: Mon, 8 Feb 2010 09:47:39 -0500 Subject: [PATCH] Moved call to cache CDash version information to cmCTest::initialize. Also added a 3 second timeout when requesting the version from the server. Added an option to the CTestConfiguration that will be used to determine whether to query the version information at all. (Behavior for this setting is not yet defined.) Updated CMake's local CDash version setting to 1.6. --- CTestConfig.cmake | 3 ++- Modules/DartConfiguration.tcl.in | 1 + Source/cmCTest.cxx | 10 ++++++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CTestConfig.cmake b/CTestConfig.cmake index 145792b72..0add34b92 100644 --- a/CTestConfig.cmake +++ b/CTestConfig.cmake @@ -16,7 +16,8 @@ set(CTEST_DROP_METHOD "http") set(CTEST_DROP_SITE "www.cdash.org") set(CTEST_DROP_LOCATION "/CDash/submit.php?project=CMake") set(CTEST_DROP_SITE_CDASH TRUE) -set(CTEST_CDASH_VERSION "1.4") +set(CTEST_CDASH_VERSION "1.6") +set(CTEST_CDASH_QUERY_VERSION TRUE) # use old trigger stuff so that cmake 2.4 and below will not # get errors on trigger diff --git a/Modules/DartConfiguration.tcl.in b/Modules/DartConfiguration.tcl.in index 98d7cd26f..be2b691ee 100644 --- a/Modules/DartConfiguration.tcl.in +++ b/Modules/DartConfiguration.tcl.in @@ -16,6 +16,7 @@ BuildName: @BUILDNAME@ # Submission information IsCDash: @CTEST_DROP_SITE_CDASH@ CDashVersion: @CTEST_CDASH_VERSION@ +QueryCDashVersion: @CTEST_CDASH_QUERY_VERSION@ DropSite: @DROP_SITE@ DropLocation: @DROP_LOCATION@ DropSiteUser: @DROP_SITE_USER@ diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 2e2139e47..7b25f8e12 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -349,9 +349,7 @@ cmCTest::cmCTest() { it->second->SetCTestInstance(this); } - // call this so that the information is cached up front - // and not the first time EndTest is called. - this->ShouldCompressTestOutput(); + // Make sure we can capture the build tool output. cmSystemTools::EnableVSConsoleOutput(); } @@ -400,7 +398,7 @@ std::string cmCTest::GetCDashVersion() std::string url = "http://"; url += this->GetCTestConfiguration("DropSite") + "/CDash/api/getversion.php"; - int res = cmCTest::HTTPRequest(url, cmCTest::HTTP_GET, response); + int res = cmCTest::HTTPRequest(url, cmCTest::HTTP_GET, response, "", "", 3); return res ? this->GetCTestConfiguration("CDashVersion") : response; #else @@ -473,6 +471,10 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command) return 0; } + // call this so that the information is cached up front + // and not the first time EndTest is called. + this->ShouldCompressTestOutput(); + if ( this->ProduceXML ) { // Verify "Testing" directory exists: