summaryrefslogtreecommitdiffstats
path: root/test/flushrefreshTest.cmake
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-02-15 21:48:24 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-02-15 21:48:24 (GMT)
commit122b63a5a27227f2349634f4e8f8e43d739255f5 (patch)
tree195fb47964dd6c95844ad1ec4da210bdaa0b9c25 /test/flushrefreshTest.cmake
parent6ea0dafa41415c0888889214c82f75a02ec4a545 (diff)
downloadhdf5-122b63a5a27227f2349634f4e8f8e43d739255f5.zip
hdf5-122b63a5a27227f2349634f4e8f8e43d739255f5.tar.gz
hdf5-122b63a5a27227f2349634f4e8f8e43d739255f5.tar.bz2
HDFFV-10703 Update CMake commands to latest standard
Diffstat (limited to 'test/flushrefreshTest.cmake')
-rw-r--r--test/flushrefreshTest.cmake102
1 files changed, 51 insertions, 51 deletions
diff --git a/test/flushrefreshTest.cmake b/test/flushrefreshTest.cmake
index f66ee64..aa18c8a 100644
--- a/test/flushrefreshTest.cmake
+++ b/test/flushrefreshTest.cmake
@@ -53,7 +53,7 @@ if (TEST_ENV_VAR)
#message (STATUS "ENV:${TEST_ENV_VAR}=$ENV{${TEST_ENV_VAR}}")
endif ()
-message(STATUS "Background: ${PERL_EXECUTABLE} ${PERL_SCRIPT} ${TEST_PROGRAM}")
+message (STATUS "Background: ${PERL_EXECUTABLE} ${PERL_SCRIPT} ${TEST_PROGRAM}")
execute_process (
COMMAND ${PERL_EXECUTABLE} ${PERL_SCRIPT} ${TEST_PROGRAM}
RESULT_VARIABLE SCRIPT_RESULT
@@ -61,34 +61,34 @@ execute_process (
OUTPUT_VARIABLE SCRIPT_OUTPUT
WORKING_DIRECTORY ${TEST_FOLDER}
)
-message(STATUS "Background: ${SCRIPT_OUTPUT}")
-if (NOT "${SCRIPT_RESULT}" STREQUAL "0")
+message (STATUS "Background: ${SCRIPT_OUTPUT}")
+if (SCRIPT_RESULT)
message (FATAL_ERROR "Failed: The background script failed ${SCRIPT_RESULT}: ${SCRIPT_ERR}")
endif ()
-set(verification_done "0")
-while(verification_done LESS "1")
- message(STATUS "checking first stage:${TEST_FOLDER}/${TEST_ARGS1}")
- if(EXISTS ${TEST_FOLDER}/${TEST_ERR})
+set (verification_done "0")
+while (verification_done LESS "1")
+ message (STATUS "checking first stage:${TEST_FOLDER}/${TEST_ARGS1}")
+ if (EXISTS ${TEST_FOLDER}/${TEST_ERR})
# Error exit script
- set(verification_done "3")
- elseif(EXISTS ${TEST_FOLDER}/${TEST_ARGS1})
+ set (verification_done "3")
+ elseif (EXISTS ${TEST_FOLDER}/${TEST_ARGS1})
file (STRINGS ${TEST_FOLDER}/${TEST_ARGS1} v1)
list (LENGTH v1 len_v1)
- message(STATUS "v1:${v1} len_v1:${len_v1}")
- if (NOT "${len_v1}" STREQUAL "0")
+ message (STATUS "v1:${v1} len_v1:${len_v1}")
+ if (len_v1)
list (GET v1 0 param1)
list (GET v1 -1 param2)
endif ()
- file(REMOVE ${TEST_FOLDER}/${TEST_ARGS1})
- message(STATUS "PARAM1:${param1} PARAM2:${param2}")
+ file (REMOVE ${TEST_FOLDER}/${TEST_ARGS1})
+ message (STATUS "PARAM1:${param1} PARAM2:${param2}")
- if(${param1} MATCHES "VERIFICATION_DONE")
- set(verification_done "1")
- file(WRITE ${TEST_FOLDER}/${TEST_ARGS2} "all flush verification complete")
- message(STATUS "write: ${TEST_FOLDER}/${TEST_ARGS2}")
- else()
- message(STATUS "execute: ${TEST_PROGRAM} ${param1} ${param2}")
+ if (param1 MATCHES "VERIFICATION_DONE")
+ set (verification_done "1")
+ file (WRITE ${TEST_FOLDER}/${TEST_ARGS2} "all flush verification complete")
+ message (STATUS "write: ${TEST_FOLDER}/${TEST_ARGS2}")
+ else ()
+ message (STATUS "execute: ${TEST_PROGRAM} ${param1} ${param2}")
execute_process (
COMMAND ${TEST_PROGRAM} ${param1} ${param2}
RESULT_VARIABLE TEST_RESULT
@@ -98,40 +98,40 @@ while(verification_done LESS "1")
ERROR_VARIABLE TEST_ERROR
WORKING_DIRECTORY ${TEST_FOLDER}
)
- message(STATUS "flush verification: ${TEST_OUT}")
- if (NOT "${TEST_RESULT}" STREQUAL "0")
+ message (STATUS "flush verification: ${TEST_OUT}")
+ if (TEST_RESULT)
message (FATAL_ERROR "Failed: The flush verification failed ${TEST_RESULT}: ${TEST_ERROR}")
endif ()
- file(WRITE ${TEST_FOLDER}/${TEST_ARGS2} "verification flush process done")
- endif()
- else()
- message(STATUS "waiting: ${TEST_FOLDER}/${TEST_ARGS1}")
+ file (WRITE ${TEST_FOLDER}/${TEST_ARGS2} "verification flush process done")
+ endif ()
+ else ()
+ message (STATUS "waiting: ${TEST_FOLDER}/${TEST_ARGS1}")
#execute_process (COMMAND ${CMAKE_COMMAND} -E sleep 2)
- endif()
-endwhile()
+ endif ()
+endwhile ()
-while(verification_done LESS "2")
- message(STATUS "checking second stage:${TEST_FOLDER}/${TEST_ARGS1}")
- if(EXISTS ${TEST_FOLDER}/${TEST_ERR})
+while (verification_done LESS "2")
+ message (STATUS "checking second stage:${TEST_FOLDER}/${TEST_ARGS1}")
+ if (EXISTS ${TEST_FOLDER}/${TEST_ERR})
# Error exit script
- set(verification_done "3")
- elseif(EXISTS ${TEST_FOLDER}/${TEST_ARGS1})
+ set (verification_done "3")
+ elseif (EXISTS ${TEST_FOLDER}/${TEST_ARGS1})
file (STRINGS ${TEST_FOLDER}/${TEST_ARGS1} v1)
list (LENGTH v1 len_v1)
- message(STATUS "v1:${v1} len_v1:${len_v1}")
- if (NOT "${len_v1}" STREQUAL "0")
+ message (STATUS "v1:${v1} len_v1:${len_v1}")
+ if (len_v1)
list (GET v1 0 param1)
list (GET v1 -1 param2)
endif ()
- file(REMOVE ${TEST_FOLDER}/${TEST_ARGS1})
- message(STATUS "PARAM1:${param1} PARAM2:${param2}")
+ file (REMOVE ${TEST_FOLDER}/${TEST_ARGS1})
+ message (STATUS "PARAM1:${param1} PARAM2:${param2}")
- if(${param1} MATCHES "VERIFICATION_DONE")
- set(verification_done "2")
- file(WRITE ${TEST_FOLDER}/${TEST_ARGS2} "all refresh verification complete")
- message(STATUS "write: ${TEST_FOLDER}/${TEST_ARGS2}")
- else()
- message(STATUS "execute: ${TEST_PROGRAM} ${param1}")
+ if (param1 MATCHES "VERIFICATION_DONE")
+ set (verification_done "2")
+ file (WRITE ${TEST_FOLDER}/${TEST_ARGS2} "all refresh verification complete")
+ message (STATUS "write: ${TEST_FOLDER}/${TEST_ARGS2}")
+ else ()
+ message (STATUS "execute: ${TEST_PROGRAM} ${param1}")
execute_process (
COMMAND ${TEST_PROGRAM} ${param1}
RESULT_VARIABLE TEST_RESULT
@@ -141,22 +141,22 @@ while(verification_done LESS "2")
ERROR_VARIABLE TEST_ERROR
WORKING_DIRECTORY ${TEST_FOLDER}
)
- message(STATUS "refresh verification: ${TEST_OUT}")
- if (NOT "${TEST_RESULT}" STREQUAL "0")
+ message (STATUS "refresh verification: ${TEST_OUT}")
+ if (TEST_RESULT)
message (FATAL_ERROR "Failed: The refresh verification failed ${TEST_RESULT}: ${TEST_ERROR}")
endif ()
- file(WRITE ${TEST_FOLDER}/${TEST_ARGS2} "refresh verifiction process done")
- endif()
- else()
- message(STATUS "waiting: ${TEST_FOLDER}/${TEST_ARGS1}")
+ file (WRITE ${TEST_FOLDER}/${TEST_ARGS2} "refresh verifiction process done")
+ endif ()
+ else ()
+ message (STATUS "waiting: ${TEST_FOLDER}/${TEST_ARGS1}")
#execute_process (COMMAND ${CMAKE_COMMAND} -E sleep 2)
- endif()
-endwhile()
+ endif ()
+endwhile ()
message (STATUS "COMMAND Result: ${TEST_RESULT}")
# if the return value is !=${TEST_EXPECT} bail out
-if (NOT "${TEST_RESULT}" STREQUAL "${TEST_EXPECT}")
+if (NOT TEST_RESULT EQUAL TEST_EXPECT)
if (NOT TEST_NOERRDISPLAY)
if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT})
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)