summaryrefslogtreecommitdiffstats
path: root/fortran/test/CMakeTests.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'fortran/test/CMakeTests.cmake')
-rw-r--r--fortran/test/CMakeTests.cmake47
1 files changed, 32 insertions, 15 deletions
diff --git a/fortran/test/CMakeTests.cmake b/fortran/test/CMakeTests.cmake
index c93b4a2..df5c76c 100644
--- a/fortran/test/CMakeTests.cmake
+++ b/fortran/test/CMakeTests.cmake
@@ -16,7 +16,7 @@
##############################################################################
##############################################################################
-set (test_CLEANFILES
+set (testhdf5_fortran_CLEANFILES
a.h5
b.h5
c.h5
@@ -55,14 +55,9 @@ set (test_CLEANFILES
# Remove any output file left over from previous test run
add_test (
NAME FORTRAN_testhdf5-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ${test_CLEANFILES}
+ COMMAND ${CMAKE_COMMAND} -E remove ${testhdf5_fortran_CLEANFILES}
)
-if (last_test)
- set_tests_properties (FORTRAN_testhdf5-clear-objects PROPERTIES DEPENDS ${last_test})
-endif ()
-set (last_test "FORTRAN_testhdf5-clear-objects")
+set_tests_properties (FORTRAN_testhdf5-clear-objects PROPERTIES FIXTURES_SETUP clear_testhdf5_fortran)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME FORTRAN_testhdf5_fortran COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:testhdf5_fortran>)
@@ -82,7 +77,9 @@ else ()
)
endif ()
#set_tests_properties (FORTRAN_testhdf5_fortran PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
-set_tests_properties (FORTRAN_testhdf5_fortran PROPERTIES DEPENDS FORTRAN_testhdf5-clear-objects)
+set_tests_properties (FORTRAN_testhdf5_fortran PROPERTIES
+ FIXTURES_REQUIRED clear_testhdf5_fortran
+)
#-- Adding test for testhdf5_fortran_1_8
if (HDF5_ENABLE_USING_MEMCHECKER)
@@ -103,7 +100,10 @@ else ()
)
endif ()
#set_tests_properties (FORTRAN_testhdf5_fortran_1_8 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
-set_tests_properties (FORTRAN_testhdf5_fortran_1_8 PROPERTIES DEPENDS FORTRAN_testhdf5_fortran)
+set_tests_properties (FORTRAN_testhdf5_fortran_1_8 PROPERTIES
+ DEPENDS FORTRAN_testhdf5_fortran
+ FIXTURES_REQUIRED clear_testhdf5_fortran
+)
#-- Adding test for fortranlib_test_F03
if (HDF5_ENABLE_USING_MEMCHECKER)
@@ -124,7 +124,10 @@ else ()
)
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)
+set_tests_properties (FORTRAN_fortranlib_test_F03 PROPERTIES
+ DEPENDS FORTRAN_testhdf5_fortran_1_8
+ FIXTURES_REQUIRED clear_testhdf5_fortran
+)
#-- Adding test for vol_connector
if (HDF5_ENABLE_USING_MEMCHECKER)
@@ -146,9 +149,23 @@ else ()
endif ()
#-- Adding test for fflush1
-add_test (NAME FORTRAN_fflush1 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:fflush1>)
-set_tests_properties (FORTRAN_fflush1 PROPERTIES DEPENDS FORTRAN_testhdf5-clear-objects)
+add_test (
+ NAME FORTRAN_flush1-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove flush.h5
+)
+add_test (
+ NAME FORTRAN_fflush1
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:fflush1>
+)
+set_tests_properties (FORTRAN_fflush1 PROPERTIES
+ DEPENDS FORTRAN_flush1-clear-objects
+)
#-- Adding test for fflush2
-add_test (NAME FORTRAN_fflush2 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:fflush2>)
-set_tests_properties (FORTRAN_fflush2 PROPERTIES DEPENDS FORTRAN_fflush1)
+add_test (
+ NAME FORTRAN_fflush2
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:fflush2>
+)
+set_tests_properties (FORTRAN_fflush2 PROPERTIES
+ DEPENDS FORTRAN_fflush1
+)