Skip to content

Commit de0a5f0

Browse files
committed
run test .cmake use defined to test defined or not.
1 parent 10b495e commit de0a5f0

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

tests/gwb-dat/run_gwb-dat_tests.cmake

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
# arguments checking
2-
if( NOT TEST_NAME )
2+
if( NOT DEFINED TEST_NAME )
33
message( FATAL_ERROR "Require TEST_NAME to be defined." )
4-
endif( NOT TEST_NAME )
5-
if( NOT TEST_PROGRAM )
4+
endif( NOT DEFINED TEST_NAME )
5+
if( NOT DEFINED TEST_PROGRAM )
66
message( FATAL_ERROR "Require TEST_PROGRAM to be defined." )
7-
endif( NOT TEST_PROGRAM )
8-
if( NOT TEST_OUTPUT )
7+
endif( NOT DEFINED TEST_PROGRAM )
8+
if( NOT DEFINED TEST_OUTPUT )
99
message( FATAL_ERROR "Require TEST_OUTPUT to be defined" )
10-
endif( NOT TEST_OUTPUT )
11-
if( NOT TEST_REFERENCE )
10+
endif( NOT DEFINED TEST_OUTPUT )
11+
if( NOT DEFINED TEST_REFERENCE )
1212
message( FATAL_ERROR "Require TEST_REFERENCE to be defined" )
13-
endif( NOT TEST_REFERENCE )
14-
if( NOT TEST_DIFF )
13+
endif( NOT DEFINED TEST_REFERENCE )
14+
if( NOT DEFINED TEST_DIFF )
1515
message( FATAL_ERROR "Require TEST_DIFF to be defined" )
16-
endif( NOT TEST_DIFF )
17-
if( NOT REPLACE_FAILING_TEST_RESULTS )
16+
endif( NOT DEFINED TEST_DIFF )
17+
if( NOT DEFINED REPLACE_FAILING_TEST_RESULTS )
1818
message( FATAL_ERROR "Require REPLACE_FAILING_TEST_RESULTS to be defined: ${REPLACE_FAILING_TEST_RESULTS}" )
19-
endif( NOT REPLACE_FAILING_TEST_RESULTS )
19+
endif( NOT DEFINED REPLACE_FAILING_TEST_RESULTS )
2020

2121
# create a directory for the test
2222
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/gwb-dat/${TEST_NAME})

tests/gwb-grid/run_gwb-grid_tests.cmake

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
# arguments checking
2-
if( NOT TEST_NAME )
2+
if( NOT DEFINED TEST_NAME )
33
message( FATAL_ERROR "Require TEST_NAME to be defined." )
4-
endif( NOT TEST_NAME )
5-
if( NOT TEST_PROGRAM )
4+
endif( NOT DEFINED TEST_NAME )
5+
if( NOT DEFINED TEST_PROGRAM )
66
message( FATAL_ERROR "Require TEST_PROGRAM to be defined." )
7-
endif( NOT TEST_PROGRAM )
8-
if( NOT TEST_OUTPUT )
7+
endif( NOT DEFINED TEST_PROGRAM )
8+
if( NOT DEFINED TEST_OUTPUT )
99
message( FATAL_ERROR "Require TEST_OUTPUT to be defined" )
10-
endif( NOT TEST_OUTPUT )
11-
if( NOT TEST_REFERENCE )
10+
endif( NOT DEFINED TEST_OUTPUT )
11+
if( NOT DEFINED TEST_REFERENCE )
1212
message( FATAL_ERROR "Require TEST_REFERENCE to be defined" )
13-
endif( NOT TEST_REFERENCE )
14-
if( NOT REPLACE_FAILING_TEST_RESULTS )
13+
endif( NOT DEFINED TEST_REFERENCE )
14+
if( NOT DEFINED REPLACE_FAILING_TEST_RESULTS )
1515
message( FATAL_ERROR "Require REPLACE_FAILING_TEST_RESULTS to be defined" )
16-
endif( NOT REPLACE_FAILING_TEST_RESULTS )
16+
endif( NOT DEFINED REPLACE_FAILING_TEST_RESULTS )
1717

1818
# create a directory for the test
1919
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/gwb-grid/${TEST_NAME})

0 commit comments

Comments
 (0)