summaryrefslogtreecommitdiffstats
path: root/config/cmake_ext_mod
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-08-29 19:23:22 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-08-29 19:23:22 (GMT)
commit46c21c305aa10e72b64b66f937cf1d222b152356 (patch)
treed7bd7580a9321b598ce83e75b3eb75c6ef8d21f9 /config/cmake_ext_mod
parent172dba34271abcef98763624d46562bca3f147fb (diff)
downloadhdf5-46c21c305aa10e72b64b66f937cf1d222b152356.zip
hdf5-46c21c305aa10e72b64b66f937cf1d222b152356.tar.gz
hdf5-46c21c305aa10e72b64b66f937cf1d222b152356.tar.bz2
Fix EXISTS test and add toolchain
Diffstat (limited to 'config/cmake_ext_mod')
-rw-r--r--config/cmake_ext_mod/grepTest.cmake8
-rw-r--r--config/cmake_ext_mod/runTest.cmake8
2 files changed, 8 insertions, 8 deletions
diff --git a/config/cmake_ext_mod/grepTest.cmake b/config/cmake_ext_mod/grepTest.cmake
index ab00e70..78ee0da 100644
--- a/config/cmake_ext_mod/grepTest.cmake
+++ b/config/cmake_ext_mod/grepTest.cmake
@@ -35,11 +35,11 @@ if (NOT TEST_REFERENCE)
message (FATAL_ERROR "Require TEST_REFERENCE to be defined")
endif ()
-if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT})
+if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}")
file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT})
endif ()
-if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err")
file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}.err)
endif ()
@@ -84,7 +84,7 @@ endif ()
# if the TEST_ERRREF exists grep the error output with the error reference
if (TEST_ERRREF)
# if the .err file exists grep the error output with the error reference before comparing stdout
- if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+ if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err")
file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_ERR_STREAM)
# TEST_ERRREF should always be matched
@@ -97,7 +97,7 @@ if (TEST_ERRREF)
#always compare output file to reference unless this must be skipped
if (NOT TEST_SKIP_COMPARE)
- if (EXISTS ${TEST_FOLDER}/${TEST_REFERENCE})
+ if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}")
if (WIN32 OR MINGW)
configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF)
file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE}.tmp ${TEST_FOLDER}/${TEST_REFERENCE})
diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake
index 21c8c18..100de3e 100644
--- a/config/cmake_ext_mod/runTest.cmake
+++ b/config/cmake_ext_mod/runTest.cmake
@@ -27,11 +27,11 @@ if (NOT TEST_EXPECT)
message (STATUS "Require TEST_EXPECT to be defined")
endif ()
-if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT})
+if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}")
file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT})
endif ()
-if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err")
file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}.err)
endif ()
@@ -88,7 +88,7 @@ endif ()
message (STATUS "COMMAND Result: ${TEST_RESULT}")
# if the .err file exists and ERRROR_APPEND is enabled
-if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err")
file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
if (TEST_MASK_FILE)
STRING(REGEX REPLACE "CurrentDir is [^\n]+\n" "CurrentDir is (dir name)\n" TEST_STREAM "${TEST_STREAM}")
@@ -113,7 +113,7 @@ endif ()
# if the return value is !=${TEST_EXPECT} bail out
if (NOT TEST_RESULT EQUAL TEST_EXPECT)
if (NOT TEST_NOERRDISPLAY)
- if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT})
+ if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}")
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
message (STATUS "Output :\n${TEST_STREAM}")
endif ()