summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/RunCMake.cmake
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2018-12-13 23:43:13 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2018-12-13 23:47:13 (GMT)
commitb6eafd5781bfce88e29b5e6d5bf07bfe742c9654 (patch)
tree97f79ad2643b42f0194c9ebcf08bf1db095455fc /Tests/RunCMake/RunCMake.cmake
parent65b54a01ad3ee83023707a5bd4bc119a4ff5b7b1 (diff)
downloadCMake-b6eafd5781bfce88e29b5e6d5bf07bfe742c9654.zip
CMake-b6eafd5781bfce88e29b5e6d5bf07bfe742c9654.tar.gz
CMake-b6eafd5781bfce88e29b5e6d5bf07bfe742c9654.tar.bz2
Tests: Add RunCMake_TEST_FILTER environment variable
This environment variable allows developers to locally run only a subset of RunCMake subtests in a single RunCMakeTest.cmake script. If the environment variable is not set, all of the tests in the script are run.
Diffstat (limited to 'Tests/RunCMake/RunCMake.cmake')
-rw-r--r--Tests/RunCMake/RunCMake.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake
index 4bacd96..ce71677 100644
--- a/Tests/RunCMake/RunCMake.cmake
+++ b/Tests/RunCMake/RunCMake.cmake
@@ -9,6 +9,10 @@ foreach(arg
endforeach()
function(run_cmake test)
+ if(DEFINED ENV{RunCMake_TEST_FILTER} AND NOT test MATCHES "$ENV{RunCMake_TEST_FILTER}")
+ return()
+ endif()
+
set(top_src "${RunCMake_SOURCE_DIR}")
set(top_bin "${RunCMake_BINARY_DIR}")
if(EXISTS ${top_src}/${test}-result.txt)