diff options
author | Brad King <brad.king@kitware.com> | 2018-11-15 13:03:12 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-11-15 13:08:56 (GMT) |
commit | bdec3bd896b6faabab1c7cae79d8e75e8d0f0e41 (patch) | |
tree | 3c58a0baf529eb63dd6a2284e45bfe017a6fbbb0 /Tests/RunCMake/RunCMake.cmake | |
parent | 8d70ed5a10362209d265a15d993f319235aea7e5 (diff) | |
download | CMake-bdec3bd896b6faabab1c7cae79d8e75e8d0f0e41.zip CMake-bdec3bd896b6faabab1c7cae79d8e75e8d0f0e41.tar.gz CMake-bdec3bd896b6faabab1c7cae79d8e75e8d0f0e41.tar.bz2 |
Tests: Teach RunCMake infrastructure to optionally provide stdin
Diffstat (limited to 'Tests/RunCMake/RunCMake.cmake')
-rw-r--r-- | Tests/RunCMake/RunCMake.cmake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake index 69c96cc..c076ad9 100644 --- a/Tests/RunCMake/RunCMake.cmake +++ b/Tests/RunCMake/RunCMake.cmake @@ -65,6 +65,13 @@ function(run_cmake test) else() set(maybe_timeout "") endif() + if(RunCMake-stdin-file AND EXISTS ${top_src}/${RunCMake-stdin-file}) + set(maybe_input_file INPUT_FILE ${top_src}/${RunCMake-stdin-file}) + elseif(EXISTS ${top_src}/${test}-stdin.txt) + set(maybe_input_file INPUT_FILE ${top_src}/${test}-stdin.txt) + else() + set(maybe_input_file "") + endif() if(RunCMake_TEST_COMMAND) execute_process( COMMAND ${RunCMake_TEST_COMMAND} @@ -74,6 +81,7 @@ function(run_cmake test) RESULT_VARIABLE actual_result ENCODING UTF8 ${maybe_timeout} + ${maybe_input_file} ) else() if(RunCMake_GENERATOR_INSTANCE) @@ -96,6 +104,7 @@ function(run_cmake test) RESULT_VARIABLE actual_result ENCODING UTF8 ${maybe_timeout} + ${maybe_input_file} ) endif() set(msg "") |