CTest: Do not get CDash version without drop site (#12618)

Avoid sleep for 3 seconds in ctest if CDashDropSite is empty.
This commit is contained in:
Valat Sébastien authored and Brad King committed 2011-12-12 09:35:09 -05:00
1 parent 99771d55be
commit 52f937aea8
1 file changed
+6 -2
+6 -2
View File
@@ -440,8 +440,12 @@ std::string cmCTest::GetCDashVersion()
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);
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