diff options
Diffstat (limited to 'config/cmake/userblockTest.cmake')
-rw-r--r-- | config/cmake/userblockTest.cmake | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/config/cmake/userblockTest.cmake b/config/cmake/userblockTest.cmake index 9af7e5b..0e9d01b 100644 --- a/config/cmake/userblockTest.cmake +++ b/config/cmake/userblockTest.cmake @@ -20,7 +20,7 @@ if (NOT TEST_GET_PROGRAM) message (FATAL_ERROR "Require TEST_GET_PROGRAM getub to be defined") endif () if (NOT TEST_FOLDER) - message ( FATAL_ERROR "Require TEST_FOLDER to be defined") + message (FATAL_ERROR "Require TEST_FOLDER to be defined") endif () if (NOT TEST_HFILE) message (FATAL_ERROR "Require TEST_HFILE the hdf file to be defined") @@ -62,7 +62,7 @@ if (TEST_CHECKUB STREQUAL "YES") OUTPUT_VARIABLE TEST_OUT ERROR_VARIABLE TEST_ERROR ) - if (NOT ${TEST_RESULT} STREQUAL "0") + if (TEST_RESULT) message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} ${TEST_OFILE} is: ${TEST_ERROR}") endif () file (READ ${TEST_HFILE}.len.txt TEST_O_STRING_LEN) @@ -70,7 +70,7 @@ if (TEST_CHECKUB STREQUAL "YES") math( EXPR TEST_STRING_SIZE "${TEST_U_STRING_LEN} + ${TEST_O_STRING_LEN}" ) - if (NOT TEST_O_STRING_LEN STREQUAL "0") + if (TEST_O_STRING_LEN) #$JAM_BIN/getub -c $s2 $origfile > $cmpfile EXECUTE_PROCESS ( COMMAND ${TEST_GET_PROGRAM} -c ${TEST_O_STRING_LEN} ${TEST_OFILE} @@ -108,7 +108,7 @@ if (TEST_CHECKUB STREQUAL "YES") message (STATUS "COMPARE Result: ${TEST_RESULT}: ${TEST_STRING_SIZE}=${TEST_U_STRING_LEN}+${TEST_O_STRING_LEN}") # if the return value is !=${TEST_EXPECT} bail out - if (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT}) + if (NOT TEST_RESULT EQUAL TEST_EXPECT) message (FATAL_ERROR "Failed: The output of ${TEST_HFILE}-ub did not match ${TEST_HFILE}.\n${TEST_ERROR}") endif () else () @@ -121,11 +121,11 @@ else () OUTPUT_VARIABLE TEST_OUT ERROR_VARIABLE TEST_ERROR ) - if (NOT TEST_H_STRING_LEN STREQUAL "0") + if (TEST_H_STRING_LEN) message (FATAL_ERROR "Failed: The output of ${TEST_HFILE} was NOT empty") endif () endif () # everything went fine... -message ("Passed: The output of CHECK matched expectation") +message (STATUS "Passed: The output of CHECK matched expectation") |