Ver Fonte

Merge topic 'ctest-instrumentation-envvar'

a97bb70bd9 Tests: Isolate tests from CTEST_USE_INSTRUMENTATION variable
2e05695b30 Help: Fix documentation for CTEST_USE_*_INSTRUMENTATION variables

Acked-by: Kitware Robot <[email protected]>
Merge-request: !11038
Brad King há 2 meses atrás
pai
commit
51fe4c2a0e

+ 1 - 1
Help/envvar/CTEST_USE_INSTRUMENTATION.rst

@@ -10,6 +10,6 @@ CTEST_USE_INSTRUMENTATION
    This feature is only available when experimental support for instrumentation
    has been enabled by the ``CMAKE_EXPERIMENTAL_INSTRUMENTATION`` gate.
 
-Setting this environment variable enables
+Setting this environment variable to ``1``, ``True``, or ``ON`` enables
 :manual:`instrumentation <cmake-instrumentation(7)>` for CTest in
 :ref:`Dashboard Client` mode.

+ 4 - 3
Help/envvar/CTEST_USE_VERBOSE_INSTRUMENTATION.rst

@@ -10,8 +10,9 @@ CTEST_USE_VERBOSE_INSTRUMENTATION
    This feature is only available when experimental support for instrumentation
    has been enabled by the ``CMAKE_EXPERIMENTAL_INSTRUMENTATION`` gate.
 
-Setting this environment variable causes CTest to report the full
-command line (including arguments) to CDash for each instrumented command.
-By default, CTest truncates the command line at the first space.
+Setting this environment variable to ``1``, ``True``, or ``ON`` causes CTest to
+report the full command line (including arguments) to CDash for each
+instrumented command. By default, CTest truncates the command line at the first
+space.
 
 See also :envvar:`CTEST_USE_INSTRUMENTATION`

+ 1 - 2
Help/manual/cmake-instrumentation.7.rst

@@ -98,8 +98,7 @@ Enabling Instrumentation for CDash Submissions
 ----------------------------------------------
 
 You can enable instrumentation when using CTest in :ref:`Dashboard Client`
-mode by setting the :envvar:`CTEST_USE_INSTRUMENTATION` environment variable
-to the current UUID for the ``CMAKE_EXPERIMENTAL_INSTRUMENTATION`` feature.
+mode by setting the :envvar:`CTEST_USE_INSTRUMENTATION` environment variable.
 Doing so automatically enables the ``dynamicSystemInformation`` option.
 
 The following table shows how each type of instrumented command gets mapped

+ 2 - 0
Tests/CMakeLists.txt

@@ -36,6 +36,8 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/CheckSwift.cmake)
 set(TEST_HOME "${CMake_BINARY_DIR}/Tests/CMakeFiles/TestHome")
 set(TEST_CONFIG_ENV_CODE "# Isolate tests from user-wide configuration.
 set(ENV{CMAKE_CONFIG_DIR} \"${TEST_HOME}/.config/cmake\")\n")
+set(TEST_INSTRUMENTATION_ENV_CODE "# Isolate tests from CTEST_USE_INSTRUMENTATION var
+unset(ENV{CTEST_USE_INSTRUMENTATION})\n")
 file(MAKE_DIRECTORY "${TEST_HOME}/.config/cmake")
 
 # Fake a user home directory to avoid polluting the real one.

+ 1 - 0
Tests/EnforceConfig.cmake.in

@@ -45,3 +45,4 @@ set(ENV{CMAKE_MAXIMUM_RECURSION_DEPTH} 100)
 @TEST_CONFIG_ENV_CODE@
 @TEST_HOME_ENV_CODE@
 @TEST_WARN_VS_CODE@
+@TEST_INSTRUMENTATION_ENV_CODE@