summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-09-06 15:22:13 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-09-06 15:22:28 (GMT)
commit4771544386302f0642b83194656d14014d600e70 (patch)
tree33ec79b7013271fd34177e8f269a9e0265c33f36 /Tests
parent00a7acb7dac674eeeac3f93fe44f18f2d9285f42 (diff)
parenta5f98df778ceba5c04805f5b7d109e2fc26ebfec (diff)
downloadCMake-4771544386302f0642b83194656d14014d600e70.zip
CMake-4771544386302f0642b83194656d14014d600e70.tar.gz
CMake-4771544386302f0642b83194656d14014d600e70.tar.bz2
Merge topic 'replace-cmsysprocess-with-cmuvprocesschain'
a5f98df778 Source: Fix mysterious new IWYU warnings 0712e3cfea cmCTestCoverageHandler: Replace cmsysProcess with cmUVProcessChain 96b3dd329e cmCTestLaunchReporter: Replace cmsysProcess with cmUVProcessChain b15ad7ebb6 cmCTest: Replace cmsysProcess with cmUVProcessChain 50a6e78a82 cmSystemTools::RunSingleCommand(): Replace cmsysProcess with cmUVProcessChain 49a37d5a97 cmCTestScriptHandler: Replace cmsysProcess with cmUVProcessChain bc702aa97e cmcmd: Replace cmsysProcess with cmUVProcessChain ec124582ac cmProcessTools::RunProcess(): Replace cmsysProcess with cmUVProcessChain ... Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !8665
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeLib/testUVProcessChainHelper.cxx4
-rw-r--r--Tests/RunCMake/CMakeLists.txt1
-rw-r--r--Tests/RunCMake/execute_process/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/execute_process/Stdin-stdin.txt1
-rw-r--r--Tests/RunCMake/execute_process/Stdin-stdout.txt1
-rw-r--r--Tests/RunCMake/execute_process/Stdin.cmake1
6 files changed, 5 insertions, 4 deletions
diff --git a/Tests/CMakeLib/testUVProcessChainHelper.cxx b/Tests/CMakeLib/testUVProcessChainHelper.cxx
index fcc45b0..b53cac4 100644
--- a/Tests/CMakeLib/testUVProcessChainHelper.cxx
+++ b/Tests/CMakeLib/testUVProcessChainHelper.cxx
@@ -7,10 +7,6 @@
#include <string>
#include <thread>
-#ifdef _WIN32
-# include <windows.h>
-#endif
-
#include "cmSystemTools.h"
static std::string getStdin()
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index a4f6141..5e212bd 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -466,6 +466,7 @@ add_RunCMake_test(build_command)
add_executable(exit_code exit_code.c)
set(execute_process_ARGS
-DEXIT_CODE_EXE=$<TARGET_FILE:exit_code>
+ -DPRINT_STDIN_EXE=$<TARGET_FILE:print_stdin>
-DPython_EXECUTABLE=${Python_EXECUTABLE}
)
if(NOT CMake_TEST_EXTERNAL_CMAKE)
diff --git a/Tests/RunCMake/execute_process/RunCMakeTest.cmake b/Tests/RunCMake/execute_process/RunCMakeTest.cmake
index c2f9144..1f89829 100644
--- a/Tests/RunCMake/execute_process/RunCMakeTest.cmake
+++ b/Tests/RunCMake/execute_process/RunCMakeTest.cmake
@@ -34,6 +34,7 @@ run_cmake_command(AnyCommandGood ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/AnyC
run_cmake_command(LastCommandError ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/LastCommandError.cmake)
run_cmake_command(LastCommandTimeout ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/LastCommandTimeout.cmake)
run_cmake_command(LastCommandGood ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/LastCommandGood.cmake)
+run_cmake_command(Stdin ${CMAKE_COMMAND} -DPRINT_STDIN_EXE=${PRINT_STDIN_EXE} -P ${RunCMake_SOURCE_DIR}/Stdin.cmake)
if(UNIX AND Python_EXECUTABLE)
run_cmake_command(AnyCommandAbnormalExit ${CMAKE_COMMAND} -DPython_EXECUTABLE=${Python_EXECUTABLE} -P ${RunCMake_SOURCE_DIR}/AnyCommandAbnormalExit.cmake)
diff --git a/Tests/RunCMake/execute_process/Stdin-stdin.txt b/Tests/RunCMake/execute_process/Stdin-stdin.txt
new file mode 100644
index 0000000..cd08755
--- /dev/null
+++ b/Tests/RunCMake/execute_process/Stdin-stdin.txt
@@ -0,0 +1 @@
+Hello world!
diff --git a/Tests/RunCMake/execute_process/Stdin-stdout.txt b/Tests/RunCMake/execute_process/Stdin-stdout.txt
new file mode 100644
index 0000000..04bd136
--- /dev/null
+++ b/Tests/RunCMake/execute_process/Stdin-stdout.txt
@@ -0,0 +1 @@
+^Hello world!$
diff --git a/Tests/RunCMake/execute_process/Stdin.cmake b/Tests/RunCMake/execute_process/Stdin.cmake
new file mode 100644
index 0000000..e8a2098
--- /dev/null
+++ b/Tests/RunCMake/execute_process/Stdin.cmake
@@ -0,0 +1 @@
+execute_process(COMMAND ${PRINT_STDIN_EXE})