diff options
Diffstat (limited to 'fortran/test')
-rw-r--r-- | fortran/test/CMakeTests.cmake | 72 | ||||
-rw-r--r-- | fortran/test/tH5P.F90 | 8 |
2 files changed, 38 insertions, 42 deletions
diff --git a/fortran/test/CMakeTests.cmake b/fortran/test/CMakeTests.cmake index 4d06359..5fa10f4 100644 --- a/fortran/test/CMakeTests.cmake +++ b/fortran/test/CMakeTests.cmake @@ -58,7 +58,7 @@ add_test ( vds.h5 visit.h5 ) -if (NOT "${last_test}" STREQUAL "") +if (last_test) set_tests_properties (FORTRAN_testhdf5-clear-objects PROPERTIES DEPENDS ${last_test}) endif () set (last_test "FORTRAN_testhdf5-clear-objects") @@ -103,26 +103,24 @@ endif () set_tests_properties (FORTRAN_testhdf5_fortran_1_8 PROPERTIES DEPENDS FORTRAN_testhdf5_fortran) #-- Adding test for fortranlib_test_F03 -if (HDF5_ENABLE_F2003) - if (HDF5_ENABLE_USING_MEMCHECKER) - add_test (NAME FORTRAN_fortranlib_test_F03 COMMAND $<TARGET_FILE:fortranlib_test_F03>) - else () - add_test (NAME FORTRAN_fortranlib_test_F03 COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$<TARGET_FILE:fortranlib_test_F03>" - -D "TEST_ARGS:STRING=" - -D "TEST_EXPECT=0" - -D "TEST_SKIP_COMPARE=TRUE" - -D "TEST_REGEX= 0 error.s." - -D "TEST_MATCH= 0 error(s)" - -D "TEST_OUTPUT=fortranlib_test_F03.txt" - #-D "TEST_REFERENCE=fortranlib_test_F03.out" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" - ) - endif () +if (HDF5_ENABLE_USING_MEMCHECKER) + add_test (NAME FORTRAN_fortranlib_test_F03 COMMAND $<TARGET_FILE:fortranlib_test_F03>) +else () + add_test (NAME FORTRAN_fortranlib_test_F03 COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$<TARGET_FILE:fortranlib_test_F03>" + -D "TEST_ARGS:STRING=" + -D "TEST_EXPECT=0" + -D "TEST_SKIP_COMPARE=TRUE" + -D "TEST_REGEX= 0 error.s." + -D "TEST_MATCH= 0 error(s)" + -D "TEST_OUTPUT=fortranlib_test_F03.txt" + #-D "TEST_REFERENCE=fortranlib_test_F03.out" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) +endif () # set_tests_properties (FORTRAN_fortranlib_test_F03 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s") set_tests_properties (FORTRAN_fortranlib_test_F03 PROPERTIES DEPENDS FORTRAN_testhdf5_fortran_1_8) -endif () #-- Adding test for fflush1 add_test (NAME FORTRAN_fflush1 COMMAND $<TARGET_FILE:fflush1>) @@ -215,26 +213,24 @@ if (BUILD_SHARED_LIBS) set_tests_properties (FORTRAN_testhdf5_fortran_1_8-shared PROPERTIES DEPENDS FORTRAN_testhdf5_fortran_1_8) #-- Adding test for fortranlib_test_F03 - if (HDF5_ENABLE_F2003) - if (HDF5_ENABLE_USING_MEMCHECKER) - add_test (NAME FORTRAN_fortranlib_test_F03-shared COMMAND $<TARGET_FILE:fortranlib_test_F03-shared>) - else () - add_test (NAME FORTRAN_fortranlib_test_F03-shared COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$<TARGET_FILE:fortranlib_test_F03-shared>" - -D "TEST_ARGS:STRING=" - -D "TEST_EXPECT=0" - -D "TEST_SKIP_COMPARE=TRUE" - -D "TEST_REGEX= 0 error.s." - -D "TEST_MATCH= 0 error(s)" - -D "TEST_OUTPUT=fortranlib_test_F03.txt" - #-D "TEST_REFERENCE=fortranlib_test_F03.out" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/fshared" - -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" - ) - endif () -# set_tests_properties (FORTRAN_fortranlib_test_F03-shared PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s") - set_tests_properties (FORTRAN_fortranlib_test_F03-shared PROPERTIES DEPENDS FORTRAN_fortranlib_test_F03) + if (HDF5_ENABLE_USING_MEMCHECKER) + add_test (NAME FORTRAN_fortranlib_test_F03-shared COMMAND $<TARGET_FILE:fortranlib_test_F03-shared>) + else () + add_test (NAME FORTRAN_fortranlib_test_F03-shared COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$<TARGET_FILE:fortranlib_test_F03-shared>" + -D "TEST_ARGS:STRING=" + -D "TEST_EXPECT=0" + -D "TEST_SKIP_COMPARE=TRUE" + -D "TEST_REGEX= 0 error.s." + -D "TEST_MATCH= 0 error(s)" + -D "TEST_OUTPUT=fortranlib_test_F03.txt" + #-D "TEST_REFERENCE=fortranlib_test_F03.out" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/fshared" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) endif () +# set_tests_properties (FORTRAN_fortranlib_test_F03-shared PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s") + set_tests_properties (FORTRAN_fortranlib_test_F03-shared PROPERTIES DEPENDS FORTRAN_fortranlib_test_F03) #-- Adding test for fflush1 add_test (NAME FORTRAN_fflush1-shared COMMAND $<TARGET_FILE:fflush1-shared>) diff --git a/fortran/test/tH5P.F90 b/fortran/test/tH5P.F90 index ed35b63..c42dd7e 100644 --- a/fortran/test/tH5P.F90 +++ b/fortran/test/tH5P.F90 @@ -657,7 +657,7 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) minimize = .TRUE. CALL h5pget_dset_no_attrs_hint_f(dcpl, minimize, error) CALL check("h5pget_dset_no_attrs_hint_f",error,total_error) - if(error .eq. 0 .and. minimize .neqv. .FALSE.) then + if(minimize .neqv. .FALSE.) then total_error = total_error + 1 write(*,*) "Default dataset minimize flag was incorrect (H5P)" endif @@ -671,7 +671,7 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) minimize = .FALSE. CALL h5pget_dset_no_attrs_hint_f(dcpl, minimize, error) CALL check("h5pget_dset_no_attrs_hint_f",error,total_error) - if(error .eq. 0 .and. minimize .neqv. .TRUE.) then + if(minimize .neqv. .TRUE.) then total_error = total_error + 1 write(*,*) "Unable to get correct dataset minimize flag (H5P)" endif @@ -681,7 +681,7 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) minimize = .TRUE. CALL h5fget_dset_no_attrs_hint_f(fid, minimize, error) CALL check("h5fget_dset_no_attrs_hint_f",error,total_error) - if(error .eq. 0 .and. minimize .neqv. .FALSE.) then + if(minimize .neqv. .FALSE.) then total_error = total_error + 1 write(*,*) "Default dataset minimize flag was incorrect (H5F)" endif @@ -695,7 +695,7 @@ SUBROUTINE test_chunk_cache(cleanup, total_error) minimize = .FALSE. CALL h5fget_dset_no_attrs_hint_f(fid, minimize, error) CALL check("h5fget_dset_no_attrs_hint_f",error,total_error) - if(error .eq. 0 .and. minimize .neqv. .TRUE.) then + if(minimize .neqv. .TRUE.) then total_error = total_error + 1 write(*,*) "Unable to get correct dataset minimize flag (H5F)" endif |