summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeTests/ProcessorCountTest.cmake.in
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2011-03-18 18:28:24 (GMT)
committerDavid Cole <david.cole@kitware.com>2011-03-18 18:28:24 (GMT)
commite6c2701002a1c4620cbc58083698bd961e1ab999 (patch)
tree9d0a8cabd5a2e7c487dc9f1e5c712b26fedf7f4c /Tests/CMakeTests/ProcessorCountTest.cmake.in
parent4dd2ec2cb9dec683eafd3b303e04418c694675a3 (diff)
downloadCMake-e6c2701002a1c4620cbc58083698bd961e1ab999.zip
CMake-e6c2701002a1c4620cbc58083698bd961e1ab999.tar.gz
CMake-e6c2701002a1c4620cbc58083698bd961e1ab999.tar.bz2
ProcessorCount: Use ERROR_QUIET with execute_process (#11302)
Also, comment out all "debugging" calls to message() that helped us interpret the output on other platforms when running on the dashboard clients. Using ERROR_QUIET avoids unnecessary stderr output while calling external tools to determine the processor count. If there's an error parsing the output, we set the count to 0 anyhow. Also, the test will fail on a CMake dashboard run if the count comes back equal to 0. Now that the code is "done"-ish, remove the debugging output. Expect no output on stdout or stderr when calling the ProcessorCount function from now on.
Diffstat (limited to 'Tests/CMakeTests/ProcessorCountTest.cmake.in')
-rw-r--r--Tests/CMakeTests/ProcessorCountTest.cmake.in13
1 files changed, 10 insertions, 3 deletions
diff --git a/Tests/CMakeTests/ProcessorCountTest.cmake.in b/Tests/CMakeTests/ProcessorCountTest.cmake.in
index c5feb31..98f6ab1 100644
--- a/Tests/CMakeTests/ProcessorCountTest.cmake.in
+++ b/Tests/CMakeTests/ProcessorCountTest.cmake.in
@@ -1,14 +1,20 @@
include(ProcessorCount)
ProcessorCount(processor_count)
+
+message("### 1. This line should be the first line of text in the test output.")
+message("### 2. If there was output from this test before line #1, then the")
+message("### 3. ProcessorCount(...) function call is emitting output that it shouldn't...")
+
message("processor_count='${processor_count}'")
execute_process(
COMMAND "@CMAKE_BINARY_DIR@/Source/kwsys/$ENV{CMAKE_CONFIG_TYPE}/cmsysTestsCxx"
testSystemInformation
- OUTPUT_VARIABLE out)
+ OUTPUT_VARIABLE tsi_out
+ ERROR_VARIABLE tsi_err)
string(REGEX REPLACE "(.*)GetNumberOfPhysicalCPU:.([0-9]*)(.*)" "\\2"
- system_info_processor_count "${out}")
+ system_info_processor_count "${tsi_out}")
message("system_info_processor_count='${system_info_processor_count}'")
@@ -19,7 +25,8 @@ endif()
message("")
message("CTEST_FULL_OUTPUT (Avoid ctest truncation of output)")
message("")
-message("out='${out}'")
+message("tsi_out='${tsi_out}'")
+message("tsi_err='${tsi_err}'")
message("")
# Evaluate possible error conditions: