Browse Source

Merge topic 'fix-cdash-version-uri'

7dbc1a2 Fix hard-coded CDash URI in version query
Brad King 15 years ago
parent
commit
9b02aee86e
1 changed files with 7 additions and 3 deletions
  1. 7 3
      Source/cmCTest.cxx

+ 7 - 3
Source/cmCTest.cxx

@@ -410,10 +410,14 @@ std::string cmCTest::GetCDashVersion()
   //First query the server.  If that fails, fall back to the local setting
   std::string response;
   std::string url = "http://";
-  url += this->GetCTestConfiguration("DropSite") + "/CDash/api/getversion.php";
-  
+  url += this->GetCTestConfiguration("DropSite");
+
+  std::string cdashUri = this->GetCTestConfiguration("DropLocation");
+  cdashUri = cdashUri.substr(0, cdashUri.find("/submit.php"));
+
+  url += cdashUri + "/api/getversion.php";
   int res = cmCTest::HTTPRequest(url, cmCTest::HTTP_GET, response, "", "", 3);
-  
+
   return res ? this->GetCTestConfiguration("CDashVersion") : response;
 #else
   return this->GetCTestConfiguration("CDashVersion");