Skip to content

Commit

Permalink
run test .cmake use defined to test defined or not.
Browse files Browse the repository at this point in the history
  • Loading branch information
MFraters committed Oct 19, 2024
1 parent 10b495e commit de0a5f0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
24 changes: 12 additions & 12 deletions tests/gwb-dat/run_gwb-dat_tests.cmake
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# arguments checking
if( NOT TEST_NAME )
if( NOT DEFINED TEST_NAME )
message( FATAL_ERROR "Require TEST_NAME to be defined." )
endif( NOT TEST_NAME )
if( NOT TEST_PROGRAM )
endif( NOT DEFINED TEST_NAME )
if( NOT DEFINED TEST_PROGRAM )
message( FATAL_ERROR "Require TEST_PROGRAM to be defined." )
endif( NOT TEST_PROGRAM )
if( NOT TEST_OUTPUT )
endif( NOT DEFINED TEST_PROGRAM )
if( NOT DEFINED TEST_OUTPUT )
message( FATAL_ERROR "Require TEST_OUTPUT to be defined" )
endif( NOT TEST_OUTPUT )
if( NOT TEST_REFERENCE )
endif( NOT DEFINED TEST_OUTPUT )
if( NOT DEFINED TEST_REFERENCE )
message( FATAL_ERROR "Require TEST_REFERENCE to be defined" )
endif( NOT TEST_REFERENCE )
if( NOT TEST_DIFF )
endif( NOT DEFINED TEST_REFERENCE )
if( NOT DEFINED TEST_DIFF )
message( FATAL_ERROR "Require TEST_DIFF to be defined" )
endif( NOT TEST_DIFF )
if( NOT REPLACE_FAILING_TEST_RESULTS )
endif( NOT DEFINED TEST_DIFF )
if( NOT DEFINED REPLACE_FAILING_TEST_RESULTS )
message( FATAL_ERROR "Require REPLACE_FAILING_TEST_RESULTS to be defined: ${REPLACE_FAILING_TEST_RESULTS}" )
endif( NOT REPLACE_FAILING_TEST_RESULTS )
endif( NOT DEFINED REPLACE_FAILING_TEST_RESULTS )

# create a directory for the test
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/gwb-dat/${TEST_NAME})
Expand Down
20 changes: 10 additions & 10 deletions tests/gwb-grid/run_gwb-grid_tests.cmake
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# arguments checking
if( NOT TEST_NAME )
if( NOT DEFINED TEST_NAME )
message( FATAL_ERROR "Require TEST_NAME to be defined." )
endif( NOT TEST_NAME )
if( NOT TEST_PROGRAM )
endif( NOT DEFINED TEST_NAME )
if( NOT DEFINED TEST_PROGRAM )
message( FATAL_ERROR "Require TEST_PROGRAM to be defined." )
endif( NOT TEST_PROGRAM )
if( NOT TEST_OUTPUT )
endif( NOT DEFINED TEST_PROGRAM )
if( NOT DEFINED TEST_OUTPUT )
message( FATAL_ERROR "Require TEST_OUTPUT to be defined" )
endif( NOT TEST_OUTPUT )
if( NOT TEST_REFERENCE )
endif( NOT DEFINED TEST_OUTPUT )
if( NOT DEFINED TEST_REFERENCE )
message( FATAL_ERROR "Require TEST_REFERENCE to be defined" )
endif( NOT TEST_REFERENCE )
if( NOT REPLACE_FAILING_TEST_RESULTS )
endif( NOT DEFINED TEST_REFERENCE )
if( NOT DEFINED REPLACE_FAILING_TEST_RESULTS )
message( FATAL_ERROR "Require REPLACE_FAILING_TEST_RESULTS to be defined" )
endif( NOT REPLACE_FAILING_TEST_RESULTS )
endif( NOT DEFINED REPLACE_FAILING_TEST_RESULTS )

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

0 comments on commit de0a5f0

Please sign in to comment.