summaryrefslogtreecommitdiffstats
path: root/fortran/examples
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-07-23 21:24:56 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-07-23 21:24:56 (GMT)
commit6a932198aa9c3da1d23fe4c4bdee05891bc2e38b (patch)
tree029e075420a7c148366ba038a5f76662c0cb63b4 /fortran/examples
parentd3fdcd8a680ad0f8b21304b35e8564b774a88ef0 (diff)
downloadhdf5-6a932198aa9c3da1d23fe4c4bdee05891bc2e38b.zip
hdf5-6a932198aa9c3da1d23fe4c4bdee05891bc2e38b.tar.gz
hdf5-6a932198aa9c3da1d23fe4c4bdee05891bc2e38b.tar.bz2
HDFFV-10529 Update CMake tests to use test fixtures
Diffstat (limited to 'fortran/examples')
-rw-r--r--fortran/examples/CMakeTests.cmake52
1 files changed, 25 insertions, 27 deletions
diff --git a/fortran/examples/CMakeTests.cmake b/fortran/examples/CMakeTests.cmake
index 221e5cc..5e7dfa8 100644
--- a/fortran/examples/CMakeTests.cmake
+++ b/fortran/examples/CMakeTests.cmake
@@ -16,34 +16,30 @@
##############################################################################
##############################################################################
- set (test_CLEANFILES
- compound.h5
- copy1.h5
- copy2.h5
- dsetf.h5
- extend.h5
- FORTRAN.h5
- groupf.h5
- groupsf.h5
- h5_cmprss.h5
- mount1.h5
- mount2.h5
- sdsf.h5
- subset.h5
- SDScompound.h5
- test.h5
- )
+set (test_ex_fortran_CLEANFILES
+ compound.h5
+ copy1.h5
+ copy2.h5
+ dsetf.h5
+ extend.h5
+ FORTRAN.h5
+ groupf.h5
+ groupsf.h5
+ h5_cmprss.h5
+ mount1.h5
+ mount2.h5
+ sdsf.h5
+ subset.h5
+ SDScompound.h5
+ test.h5
+)
- # Remove any output file left over from previous test run
- add_test (
- NAME f90_ex-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove ${test_CLEANFILES}
- )
- if (last_test)
- set_tests_properties (f90_ex-clear-objects PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "f90_ex-clear-objects")
+# Remove any output file left over from previous test run
+add_test (
+ NAME f90_ex-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${test_ex_fortran_CLEANFILES}
+)
+set_tests_properties (f90_ex-clear-objects PROPERTIES FIXTURES_SETUP clear_f90_ex)
foreach (example ${examples})
if (HDF5_ENABLE_USING_MEMCHECKER)
@@ -61,6 +57,7 @@ foreach (example ${examples})
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
+ set_tests_properties (f90_ex_${example} PROPERTIES FIXTURES_REQUIRED clear_f90_ex)
if (last_test)
set_tests_properties (f90_ex_${example} PROPERTIES DEPENDS ${last_test})
endif ()
@@ -83,6 +80,7 @@ foreach (example ${F2003_examples})
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
+ set_tests_properties (f03_ex_${example} PROPERTIES FIXTURES_REQUIRED clear_f90_ex)
if (last_test)
set_tests_properties (f03_ex_${example} PROPERTIES DEPENDS ${last_test})
endif ()