summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestScriptHandler.cxx
diff options
context:
space:
mode:
authorWouter Klouwen <wouter.klouwen@youview.com>2018-01-20 15:13:21 (GMT)
committerWouter Klouwen <wouter.klouwen@youview.com>2018-01-23 18:56:42 (GMT)
commite6a80ccfc440ac8dd5e9e5405744c2423560fc02 (patch)
tree22b68d9379421a8a84ff5dab35e9689654334b04 /Source/CTest/cmCTestScriptHandler.cxx
parentff62b00522d1ddaeb88be241ab4a022f935b5c00 (diff)
downloadCMake-e6a80ccfc440ac8dd5e9e5405744c2423560fc02.zip
CMake-e6a80ccfc440ac8dd5e9e5405744c2423560fc02.tar.gz
CMake-e6a80ccfc440ac8dd5e9e5405744c2423560fc02.tar.bz2
Make use of std::chrono throughout every component
This commit continues the changes made in CTest to support std::chrono by applying it throughout every component where a duration was used. No functional change intended.
Diffstat (limited to 'Source/CTest/cmCTestScriptHandler.cxx')
-rw-r--r--Source/CTest/cmCTestScriptHandler.cxx16
1 files changed, 10 insertions, 6 deletions
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx
index 15a81f2..78ab5ff 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -27,6 +27,7 @@
#include "cmCTestTestCommand.h"
#include "cmCTestUpdateCommand.h"
#include "cmCTestUploadCommand.h"
+#include "cmDuration.h"
#include "cmFunctionBlocker.h"
#include "cmGeneratedFileStream.h"
#include "cmGlobalGenerator.h"
@@ -206,7 +207,8 @@ int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg)
std::vector<char> out;
std::vector<char> err;
std::string line;
- int pipe = cmSystemTools::WaitForLine(cp, line, 100.0, out, err);
+ int pipe =
+ cmSystemTools::WaitForLine(cp, line, std::chrono::seconds(100), out, err);
while (pipe != cmsysProcess_Pipe_None) {
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Output: " << line
<< "\n");
@@ -215,7 +217,8 @@ int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg)
} else if (pipe == cmsysProcess_Pipe_STDOUT) {
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, line << "\n");
}
- pipe = cmSystemTools::WaitForLine(cp, line, 100, out, err);
+ pipe = cmSystemTools::WaitForLine(cp, line, std::chrono::seconds(100), out,
+ err);
}
// Properly handle output of the build command
@@ -601,7 +604,8 @@ int cmCTestScriptHandler::CheckOutSourceDir()
"Run cvs: " << this->CVSCheckOut << std::endl);
res = cmSystemTools::RunSingleCommand(
this->CVSCheckOut.c_str(), &output, &output, &retVal,
- this->CTestRoot.c_str(), this->HandlerVerbose, 0 /*this->TimeOut*/);
+ this->CTestRoot.c_str(), this->HandlerVerbose,
+ cmDuration::zero() /*this->TimeOut*/);
if (!res || retVal != 0) {
cmSystemTools::Error("Unable to perform cvs checkout:\n",
output.c_str());
@@ -668,7 +672,7 @@ int cmCTestScriptHandler::PerformExtraUpdates()
"Run Update: " << fullCommand << std::endl);
res = cmSystemTools::RunSingleCommand(
fullCommand.c_str(), &output, &output, &retVal, cvsArgs[0].c_str(),
- this->HandlerVerbose, 0 /*this->TimeOut*/);
+ this->HandlerVerbose, cmDuration::zero() /*this->TimeOut*/);
if (!res || retVal != 0) {
cmSystemTools::Error("Unable to perform extra updates:\n", eu.c_str(),
"\nWith output:\n", output.c_str());
@@ -772,7 +776,7 @@ int cmCTestScriptHandler::RunConfigurationDashboard()
"Run cmake command: " << command << std::endl);
res = cmSystemTools::RunSingleCommand(
command.c_str(), &output, &output, &retVal, this->BinaryDir.c_str(),
- this->HandlerVerbose, 0 /*this->TimeOut*/);
+ this->HandlerVerbose, cmDuration::zero() /*this->TimeOut*/);
if (!this->CMOutFile.empty()) {
std::string cmakeOutputFile = this->CMOutFile;
@@ -811,7 +815,7 @@ int cmCTestScriptHandler::RunConfigurationDashboard()
"Run ctest command: " << command << std::endl);
res = cmSystemTools::RunSingleCommand(
command.c_str(), &output, &output, &retVal, this->BinaryDir.c_str(),
- this->HandlerVerbose, 0 /*this->TimeOut*/);
+ this->HandlerVerbose, cmDuration::zero() /*this->TimeOut*/);
// did something critical fail in ctest
if (!res || cmakeFailed || retVal & cmCTest::BUILD_ERRORS) {