mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-10 09:09:51 -06:00
cmCTestScriptHandler: De-duplicate WaitForLine call
This commit is contained in:
@@ -117,9 +117,10 @@ int cmCTestScriptHandler::ExecuteScript(std::string const& total_script_arg)
|
|||||||
std::vector<char> out;
|
std::vector<char> out;
|
||||||
std::vector<char> err;
|
std::vector<char> err;
|
||||||
std::string line;
|
std::string line;
|
||||||
auto pipe = cmSystemTools::WaitForLine(&process.GetLoop(), outPipe, errPipe,
|
cmSystemTools::WaitForLineResult pipe;
|
||||||
line, out, err);
|
while ((pipe = cmSystemTools::WaitForLine(&process.GetLoop(), outPipe,
|
||||||
while (pipe != cmSystemTools::WaitForLineResult::None) {
|
errPipe, line, out, err)) !=
|
||||||
|
cmSystemTools::WaitForLineResult::None) {
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Output: " << line << "\n");
|
"Output: " << line << "\n");
|
||||||
if (pipe == cmSystemTools::WaitForLineResult::STDERR) {
|
if (pipe == cmSystemTools::WaitForLineResult::STDERR) {
|
||||||
@@ -127,8 +128,6 @@ int cmCTestScriptHandler::ExecuteScript(std::string const& total_script_arg)
|
|||||||
} else if (pipe == cmSystemTools::WaitForLineResult::STDOUT) {
|
} else if (pipe == cmSystemTools::WaitForLineResult::STDOUT) {
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, line << "\n");
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, line << "\n");
|
||||||
}
|
}
|
||||||
pipe = cmSystemTools::WaitForLine(&process.GetLoop(), outPipe, errPipe,
|
|
||||||
line, out, err);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Properly handle output of the build command
|
// Properly handle output of the build command
|
||||||
|
|||||||
Reference in New Issue
Block a user