diff options
author | Brad King <brad.king@kitware.com> | 2024-01-25 15:39:50 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2024-01-25 15:40:02 (GMT) |
commit | b11c8c45f977a4d69bc5a056341b57e17a602694 (patch) | |
tree | 42f545e8385bb1da68b7799a1fc35e0ebd48377c /Source/CTest | |
parent | 4c4cd1246e5b66f731c6e145332ed75bf24fd045 (diff) | |
parent | adb3e13d323aeb19c3824112cfa712cc122db3b4 (diff) | |
download | CMake-b11c8c45f977a4d69bc5a056341b57e17a602694.zip CMake-b11c8c45f977a4d69bc5a056341b57e17a602694.tar.gz CMake-b11c8c45f977a4d69bc5a056341b57e17a602694.tar.bz2 |
Merge topic 'cmuvprocesschain'
adb3e13d32 cmUVProcessChain: Tolerate fileno() of invalid FILE stream
b6e4e4babc cmUVProcessChain: Simplify SetExternalStream usage
116bb2b70f cmUVProcessChain: Simplify builder initialization
d32c30906a Tests: Add missing include in testUVProcessChainHelper on Windows
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9181
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestCoverageHandler.cxx | 6 | ||||
-rw-r--r-- | Source/CTest/cmCTestLaunch.cxx | 9 |
2 files changed, 4 insertions, 11 deletions
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index 1aa49cf..f9f9add 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -21,8 +21,6 @@ #include "cmsys/Glob.hxx" #include "cmsys/RegularExpression.hxx" -#include "cm_fileno.hxx" - #include "cmCTest.h" #include "cmDuration.h" #include "cmGeneratedFileStream.h" @@ -1887,9 +1885,9 @@ int cmCTestCoverageHandler::RunBullseyeCommand( cmsys::SystemTools::Fopen(stderrFile, "w"), fclose); builder.AddCommand(args) .SetExternalStream(cmUVProcessChainBuilder::Stream_OUTPUT, - cm_fileno(stdoutHandle.get())) + stdoutHandle.get()) .SetExternalStream(cmUVProcessChainBuilder::Stream_ERROR, - cm_fileno(stderrHandle.get())); + stderrHandle.get()); // since we set the output file names wait for it to end auto chain = builder.Start(); chain.Wait(); diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx index 6b13ad1..9669d76 100644 --- a/Source/CTest/cmCTestLaunch.cxx +++ b/Source/CTest/cmCTestLaunch.cxx @@ -13,8 +13,6 @@ #include "cmsys/FStream.hxx" #include "cmsys/RegularExpression.hxx" -#include "cm_fileno.hxx" - #include "cmCTestLaunchReporter.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" @@ -158,11 +156,8 @@ void cmCTestLaunch::RunChild() cmsys::ofstream ferr; if (this->Reporter.Passthru) { // In passthru mode we just share the output pipes. - builder - .SetExternalStream(cmUVProcessChainBuilder::Stream_OUTPUT, - cm_fileno(stdout)) - .SetExternalStream(cmUVProcessChainBuilder::Stream_ERROR, - cm_fileno(stderr)); + builder.SetExternalStream(cmUVProcessChainBuilder::Stream_OUTPUT, stdout) + .SetExternalStream(cmUVProcessChainBuilder::Stream_ERROR, stderr); } else { // In full mode we record the child output pipes to log files. builder.SetBuiltinStream(cmUVProcessChainBuilder::Stream_OUTPUT) |