diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2023-07-25 21:14:20 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2023-08-29 14:51:30 (GMT) |
commit | b15ad7ebb6b96630396fb54b4679075a52c5f79b (patch) | |
tree | a6f651c40f2cd9ea3695ba96b39dc588558a3484 /Source/CTest/cmCTestBuildAndTestHandler.cxx | |
parent | 50a6e78a8295ac89149639839cebc3b61f2f9db3 (diff) | |
download | CMake-b15ad7ebb6b96630396fb54b4679075a52c5f79b.zip CMake-b15ad7ebb6b96630396fb54b4679075a52c5f79b.tar.gz CMake-b15ad7ebb6b96630396fb54b4679075a52c5f79b.tar.bz2 |
cmCTest: Replace cmsysProcess with cmUVProcessChain
Diffstat (limited to 'Source/CTest/cmCTestBuildAndTestHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestBuildAndTestHandler.cxx | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Source/CTest/cmCTestBuildAndTestHandler.cxx b/Source/CTest/cmCTestBuildAndTestHandler.cxx index 5feb953..bb6ccc3 100644 --- a/Source/CTest/cmCTestBuildAndTestHandler.cxx +++ b/Source/CTest/cmCTestBuildAndTestHandler.cxx @@ -7,8 +7,6 @@ #include <cstring> #include <ratio> -#include "cmsys/Process.h" - #include "cmBuildOptions.h" #include "cmCTest.h" #include "cmCTestTestHandler.h" @@ -308,12 +306,11 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring) return 1; } - std::vector<const char*> testCommand; - testCommand.push_back(fullPath.c_str()); + std::vector<std::string> testCommand; + testCommand.push_back(fullPath); for (std::string const& testCommandArg : this->TestCommandArgs) { - testCommand.push_back(testCommandArg.c_str()); + testCommand.push_back(testCommandArg); } - testCommand.push_back(nullptr); std::string outs; int retval = 0; // run the test from the this->BuildRunDir if set @@ -349,10 +346,10 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring) } } - int runTestRes = this->CTest->RunTest(testCommand, &outs, &retval, nullptr, - remainingTime, nullptr); + bool runTestRes = this->CTest->RunTest(testCommand, &outs, &retval, nullptr, + remainingTime, nullptr); - if (runTestRes != cmsysProcess_State_Exited || retval != 0) { + if (!runTestRes || retval != 0) { out << "Test command failed: " << testCommand[0] << "\n"; retval = 1; } |