summaryrefslogtreecommitdiffstats
path: root/config/cmake_ext_mod/grepTest.cmake
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2019-02-19 22:49:20 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2019-02-19 22:49:20 (GMT)
commit32ea4e72f1e85e0e7ff6457aae0bd210e56d1cad (patch)
treecfaf3296e7dddf11bba56dc00b78327c85eb63d0 /config/cmake_ext_mod/grepTest.cmake
parent536a32c59be69f9ae75604a31d0ec34c57cf9f00 (diff)
parentb901552b1ca315db8b27ea090011f2f557491d46 (diff)
downloadhdf5-32ea4e72f1e85e0e7ff6457aae0bd210e56d1cad.zip
hdf5-32ea4e72f1e85e0e7ff6457aae0bd210e56d1cad.tar.gz
hdf5-32ea4e72f1e85e0e7ff6457aae0bd210e56d1cad.tar.bz2
Merge branch 'develop' into c_stdlib_posix_call_cleanup
Diffstat (limited to 'config/cmake_ext_mod/grepTest.cmake')
-rw-r--r--config/cmake_ext_mod/grepTest.cmake8
1 files changed, 4 insertions, 4 deletions
diff --git a/config/cmake_ext_mod/grepTest.cmake b/config/cmake_ext_mod/grepTest.cmake
index b812d73..1417204 100644
--- a/config/cmake_ext_mod/grepTest.cmake
+++ b/config/cmake_ext_mod/grepTest.cmake
@@ -57,15 +57,15 @@ file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
# TEST_REFERENCE should always be matched
string (REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM})
string (COMPARE EQUAL "${TEST_REFERENCE}" "${TEST_MATCH}" TEST_RESULT)
-if ("${TEST_RESULT}" STREQUAL "0")
+if (NOT TEST_RESULT)
message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did not contain ${TEST_REFERENCE}")
endif ()
string (REGEX MATCH "${TEST_FILTER}" TEST_MATCH ${TEST_STREAM})
-if ("${TEST_EXPECT}" STREQUAL "1")
- # TEST_EXPECT (1) interperts TEST_FILTER as NOT to match
+if (TEST_EXPECT)
+ # TEST_EXPECT (1) interprets TEST_FILTER as; NOT to match
string (LENGTH "${TEST_MATCH}" TEST_RESULT)
- if (NOT "${TEST_RESULT}" STREQUAL "0")
+ if (TEST_RESULT)
message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did contain ${TEST_FILTER}")
endif ()
endif ()