summaryrefslogtreecommitdiffstats
path: root/config/cmake_ext_mod/runTest.cmake
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-10-02 17:39:15 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-10-02 17:39:15 (GMT)
commit4f9e47650aa98d1048da87be44ff3d28685554b7 (patch)
tree80bd1e918a76f086e8aef5cb3d5034f2d94d41cc /config/cmake_ext_mod/runTest.cmake
parent19ee2f9dc8ce4352b3ec82c667abecb47a1d9684 (diff)
downloadhdf5-4f9e47650aa98d1048da87be44ff3d28685554b7.zip
hdf5-4f9e47650aa98d1048da87be44ff3d28685554b7.tar.gz
hdf5-4f9e47650aa98d1048da87be44ff3d28685554b7.tar.bz2
Fix STREQUAL if commands.
Diffstat (limited to 'config/cmake_ext_mod/runTest.cmake')
-rw-r--r--config/cmake_ext_mod/runTest.cmake28
1 files changed, 14 insertions, 14 deletions
diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake
index 3a02614..2479728 100644
--- a/config/cmake_ext_mod/runTest.cmake
+++ b/config/cmake_ext_mod/runTest.cmake
@@ -87,7 +87,7 @@ if (TEST_REGEX)
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
string (REGEX MATCH "${TEST_REGEX}" REGEX_MATCH ${TEST_STREAM})
string (COMPARE EQUAL "${REGEX_MATCH}" "${TEST_MATCH}" REGEX_RESULT)
- if (${REGEX_RESULT} STREQUAL "0")
+ if ("${REGEX_RESULT}" STREQUAL "0")
message (STATUS "Failed: The output of ${TEST_PROGRAM} did not contain ${TEST_MATCH}")
endif ()
endif ()
@@ -106,7 +106,7 @@ if (TEST_APPEND)
endif ()
# if the return value is !=${TEST_EXPECT} bail out
-if (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
+if (NOT "${TEST_RESULT}" STREQUAL "${TEST_EXPECT}")
if (NOT TEST_NOERRDISPLAY)
if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT})
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
@@ -193,13 +193,13 @@ if (NOT TEST_SKIP_COMPARE)
endif ()
endif ()
- if (NOT ${TEST_RESULT} STREQUAL 0)
+ if (NOT "${TEST_RESULT}" STREQUAL "0")
set (TEST_RESULT 0)
file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act)
list (LENGTH test_act len_act)
file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref)
list (LENGTH test_ref len_ref)
- if (NOT ${len_act} STREQUAL "0" AND NOT ${len_ref} STREQUAL "0")
+ if (NOT "${len_act}" STREQUAL "0" AND NOT "${len_ref}" STREQUAL "0")
math (EXPR _FP_LEN "${len_ref} - 1")
foreach (line RANGE 0 ${_FP_LEN})
list (GET test_act ${line} str_act)
@@ -212,14 +212,14 @@ if (NOT TEST_SKIP_COMPARE)
endif ()
endforeach ()
else ()
- if (${len_act} STREQUAL "0")
+ if ("${len_act}" STREQUAL "0")
message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT} is empty")
endif ()
- if (${len_ref} STREQUAL "0")
+ if ("${len_ref}" STREQUAL "0")
message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_REFERENCE} is empty")
endif ()
endif ()
- if (NOT ${len_act} STREQUAL ${len_ref})
+ if (NOT "${len_act}" STREQUAL "${len_ref}")
set (TEST_RESULT 1)
endif ()
endif ()
@@ -227,7 +227,7 @@ if (NOT TEST_SKIP_COMPARE)
message (STATUS "COMPARE Result: ${TEST_RESULT}")
# again, if return value is !=0 scream and shout
- if (NOT ${TEST_RESULT} STREQUAL 0)
+ if (NOT "${TEST_RESULT}" STREQUAL "0")
message (FATAL_ERROR "Failed: The output of ${TEST_OUTPUT} did not match ${TEST_REFERENCE}")
endif ()
@@ -243,14 +243,14 @@ if (NOT TEST_SKIP_COMPARE)
COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF}
RESULT_VARIABLE TEST_RESULT
)
- if (NOT ${TEST_RESULT} STREQUAL 0)
+ if (NOT "${TEST_RESULT}" STREQUAL "0")
set (TEST_RESULT 0)
file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT}.err test_act)
list (LENGTH test_act len_act)
file (STRINGS ${TEST_FOLDER}/${TEST_ERRREF} test_ref)
list (LENGTH test_ref len_ref)
math (EXPR _FP_LEN "${len_ref} - 1")
- if (NOT ${len_act} STREQUAL "0" AND NOT ${len_ref} STREQUAL "0")
+ if (NOT "${len_act}" STREQUAL "0" AND NOT "${len_ref}" STREQUAL "0")
math (EXPR _FP_LEN "${len_ref} - 1")
foreach (line RANGE 0 ${_FP_LEN})
list (GET test_act ${line} str_act)
@@ -263,14 +263,14 @@ if (NOT TEST_SKIP_COMPARE)
endif ()
endforeach ()
else ()
- if (${len_act} STREQUAL "0")
+ if ("${len_act}" STREQUAL "0")
message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT}.err is empty")
endif ()
- if (${len_ref} STREQUAL "0")
+ if ("${len_ref}" STREQUAL "0")
message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_ERRREF} is empty")
endif ()
endif ()
- if (NOT ${len_act} STREQUAL ${len_ref})
+ if (NOT "${len_act}" STREQUAL "${len_ref}")
set (TEST_RESULT 1)
endif ()
endif ()
@@ -278,7 +278,7 @@ if (NOT TEST_SKIP_COMPARE)
message (STATUS "COMPARE Result: ${TEST_RESULT}")
# again, if return value is !=0 scream and shout
- if (NOT ${TEST_RESULT} STREQUAL 0)
+ if (NOT "${TEST_RESULT}" STREQUAL "0")
message (FATAL_ERROR "Failed: The error output of ${TEST_OUTPUT}.err did not match ${TEST_ERRREF}")
endif ()
endif ()