summaryrefslogtreecommitdiffstats
path: root/hl/fortran/test/CMakeTests.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'hl/fortran/test/CMakeTests.cmake')
-rw-r--r--hl/fortran/test/CMakeTests.cmake21
1 files changed, 12 insertions, 9 deletions
diff --git a/hl/fortran/test/CMakeTests.cmake b/hl/fortran/test/CMakeTests.cmake
index 0b81573..0760b92 100644
--- a/hl/fortran/test/CMakeTests.cmake
+++ b/hl/fortran/test/CMakeTests.cmake
@@ -16,7 +16,7 @@
##############################################################################
##############################################################################
-set (test_CLEANFILES
+set (test_hl_fortran_CLEANFILES
dsetf1.h5
dsetf2.h5
dsetf3.h5
@@ -28,6 +28,14 @@ set (test_CLEANFILES
tstds.h5
)
+# Remove any output file left over from previous test run
+add_test (
+ NAME HL_FORTRAN_test-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${test_hl_fortran_CLEANFILES}
+)
+set_tests_properties (HL_FORTRAN_test-clear-objects PROPERTIES FIXTURES_SETUP clear_HL_FORTRAN_test)
+
macro (ADD_H5_FORTRAN_TEST file)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME HL_FORTRAN_f90_${file} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:hl_f90_${file}>)
@@ -44,16 +52,11 @@ macro (ADD_H5_FORTRAN_TEST file)
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
- set_tests_properties (HL_FORTRAN_f90_${file} PROPERTIES DEPENDS HL_FORTRAN_test-clear-objects)
+ set_tests_properties (HL_FORTRAN_f90_${file} PROPERTIES
+ FIXTURES_REQUIRED clear_HL_FORTRAN_test
+ )
endmacro ()
-# Remove any output file left over from previous test run
-add_test (
- NAME HL_FORTRAN_test-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove ${test_CLEANFILES}
-)
-
foreach (h5_test ${H5_TESTS})
ADD_H5_FORTRAN_TEST(${h5_test})
endforeach ()