[Cmake-commits] CMake branch, master, updated. v3.13.2-768-gd780fb1

Kitware Robot kwrobot at kitware.com
Sat Dec 22 16:13:03 EST 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
       via  d780fb15a4bae35f37a3b0e34085ea0b028357e4 (commit)
       via  b6eafd5781bfce88e29b5e6d5bf07bfe742c9654 (commit)
      from  87ddcad03e69746cedcef9b9820151c6bfd8d7dc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d780fb15a4bae35f37a3b0e34085ea0b028357e4
commit d780fb15a4bae35f37a3b0e34085ea0b028357e4
Merge: 87ddcad b6eafd5
Author:     Craig Scott <craig.scott at crascit.com>
AuthorDate: Sat Dec 22 21:10:14 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Sat Dec 22 16:10:29 2018 -0500

    Merge topic 'runcmake-test-filter'
    
    b6eafd5781 Tests: Add RunCMake_TEST_FILTER environment variable
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Acked-by: Artur Ryt <artur.ryt at gmail.com>
    Merge-request: !2743


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b6eafd5781bfce88e29b5e6d5bf07bfe742c9654
commit b6eafd5781bfce88e29b5e6d5bf07bfe742c9654
Author:     Kyle Edwards <kyle.edwards at kitware.com>
AuthorDate: Thu Dec 13 18:43:13 2018 -0500
Commit:     Kyle Edwards <kyle.edwards at kitware.com>
CommitDate: Thu Dec 13 18:47:13 2018 -0500

    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.

diff --git a/Tests/RunCMake/README.rst b/Tests/RunCMake/README.rst
index 08b51d9..d8b43fe 100644
--- a/Tests/RunCMake/README.rst
+++ b/Tests/RunCMake/README.rst
@@ -65,3 +65,14 @@ but do not actually build anything.  To add a test:
     Top of test binary tree
 
    and an failure must store a message in ``RunCMake_TEST_FAILED``.
+
+To speed up local testing, you can choose to run only a subset of
+``run_cmake()`` tests in a ``RunCMakeTest.cmake`` script by using the
+``RunCMake_TEST_FILTER`` environment variable. If this variable is set,
+it is treated as a regular expression, and any tests whose names don't
+match the regular expression are not run. For example::
+
+  $ RunCMake_TEST_FILTER="^example" ctest -R '^RunCMake\.Example$'
+
+This will only run subtests in ``RunCMake.Example`` that start with
+``example``.
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)

-----------------------------------------------------------------------

Summary of changes:
 Tests/RunCMake/README.rst     | 11 +++++++++++
 Tests/RunCMake/RunCMake.cmake |  4 ++++
 2 files changed, 15 insertions(+)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list