diff options
author | Brad King <brad.king@kitware.com> | 2020-07-14 11:14:00 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-07-14 11:14:08 (GMT) |
commit | 2ef6ad0136d2df954fffe6ccce52b1636a0e5771 (patch) | |
tree | fbfebc9dace612bc08a4a964c763e10d3ea1a3c4 /Tests/RunCMake | |
parent | 46f1fa01dad3253fd7a748a765dc46b000ea67d4 (diff) | |
parent | 7cf2f7d2af708d262fc57b19c76b8d2fc63386e9 (diff) | |
download | CMake-2ef6ad0136d2df954fffe6ccce52b1636a0e5771.zip CMake-2ef6ad0136d2df954fffe6ccce52b1636a0e5771.tar.gz CMake-2ef6ad0136d2df954fffe6ccce52b1636a0e5771.tar.bz2 |
Merge topic 'profiling-case-insensitive-command-names' into release-3.18
7cf2f7d2af cmake: Store lowercase command names in profiling output
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5007
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r-- | Tests/RunCMake/CommandLine/ProfilingTest-check.cmake | 13 | ||||
-rw-r--r-- | Tests/RunCMake/CommandLine/ProfilingTest.cmake | 6 |
2 files changed, 18 insertions, 1 deletions
diff --git a/Tests/RunCMake/CommandLine/ProfilingTest-check.cmake b/Tests/RunCMake/CommandLine/ProfilingTest-check.cmake index 19ece86..2e8eac1 100644 --- a/Tests/RunCMake/CommandLine/ProfilingTest-check.cmake +++ b/Tests/RunCMake/CommandLine/ProfilingTest-check.cmake @@ -16,3 +16,16 @@ if (NOT JSON_TRAILER MATCHES "^}]$") set(RunCMake_TEST_FAILED "Expected valid JSON end") return() endif() + +file(STRINGS ${ProfilingTestOutput} upperCaseCommand + REGEX [["name"[ ]*:[ ]*"__TESTING_COMMAND_CASE"]]) +if (NOT "${upperCaseCommand}" STREQUAL "") + set(RunCMake_TEST_FAILED "Command name not stored in lowercase") +endif() +file(STRINGS ${ProfilingTestOutput} lowerCaseCommand + REGEX [["name"[ ]*:[ ]*"__testing_command_case"]]) +list(LENGTH lowerCaseCommand numInvocations) +if (NOT numInvocations EQUAL 1) + set(RunCMake_TEST_FAILED + "Unexpected number of lowercase command names: ${numInvocations}") +endif() diff --git a/Tests/RunCMake/CommandLine/ProfilingTest.cmake b/Tests/RunCMake/CommandLine/ProfilingTest.cmake index 837f4bf..4cf0c30 100644 --- a/Tests/RunCMake/CommandLine/ProfilingTest.cmake +++ b/Tests/RunCMake/CommandLine/ProfilingTest.cmake @@ -1 +1,5 @@ -# This file is intentionally left blank +function(__testing_command_case) +endfunction() + +# This must not appear in the profiling output as uppercase +__TESTING_COMMAND_CASE() |