diff options
-rw-r--r-- | Source/cmMakefileProfilingData.cxx | 2 | ||||
-rw-r--r-- | Tests/RunCMake/CommandLine/ProfilingTest-check.cmake | 13 | ||||
-rw-r--r-- | Tests/RunCMake/CommandLine/ProfilingTest.cmake | 6 |
3 files changed, 19 insertions, 2 deletions
diff --git a/Source/cmMakefileProfilingData.cxx b/Source/cmMakefileProfilingData.cxx index e0150dc..29fd440 100644 --- a/Source/cmMakefileProfilingData.cxx +++ b/Source/cmMakefileProfilingData.cxx @@ -58,7 +58,7 @@ void cmMakefileProfilingData::StartEntry(const cmListFileFunction& lff, cmsys::SystemInformation info; Json::Value v; v["ph"] = "B"; - v["name"] = lff.Name.Original; + v["name"] = lff.Name.Lower; v["cat"] = "cmake"; v["ts"] = Json::Value::UInt64( std::chrono::duration_cast<std::chrono::microseconds>( 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() |