summaryrefslogtreecommitdiffstats
path: root/fortran/test
diff options
context:
space:
mode:
Diffstat (limited to 'fortran/test')
-rw-r--r--fortran/test/CMakeLists.txt14
-rw-r--r--fortran/test/CMakeTests.cmake26
2 files changed, 27 insertions, 13 deletions
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index 72f239e..643ec94 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -73,9 +73,6 @@ ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (testhdf5_fortran PROPERTIES LINKER_LANGUAGE Fortran)
SET_TARGET_PROPERTIES (testhdf5_fortran PROPERTIES FOLDER test/fortran)
-ADD_TEST (NAME testhdf5_fortran COMMAND $<TARGET_FILE:testhdf5_fortran>)
-SET_TESTS_PROPERTIES(testhdf5_fortran PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
-
#-- Adding test for testhdf5_fortran_1_8
ADD_EXECUTABLE (testhdf5_fortran_1_8
fortranlib_test_1_8.f90
@@ -97,9 +94,6 @@ ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (testhdf5_fortran_1_8 PROPERTIES LINKER_LANGUAGE Fortran)
SET_TARGET_PROPERTIES (testhdf5_fortran_1_8 PROPERTIES FOLDER test/fortran)
-ADD_TEST (NAME testhdf5_fortran_1_8 COMMAND $<TARGET_FILE:testhdf5_fortran_1_8>)
-SET_TESTS_PROPERTIES(testhdf5_fortran_1_8 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
-
#-- Adding test for fortranlib_test_F03
IF (HDF5_ENABLE_F2003)
ADD_EXECUTABLE (fortranlib_test_F03
@@ -124,9 +118,6 @@ IF (HDF5_ENABLE_F2003)
ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (fortranlib_test_F03 PROPERTIES LINKER_LANGUAGE Fortran)
SET_TARGET_PROPERTIES (fortranlib_test_F03 PROPERTIES FOLDER test/fortran)
-
- ADD_TEST (NAME fortranlib_test_F03 COMMAND $<TARGET_FILE:fortranlib_test_F03>)
- SET_TESTS_PROPERTIES(fortranlib_test_F03 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
ENDIF (HDF5_ENABLE_F2003)
#-- Adding test for fflush1
@@ -144,8 +135,6 @@ ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (fflush1 PROPERTIES LINKER_LANGUAGE Fortran)
SET_TARGET_PROPERTIES (fflush1 PROPERTIES FOLDER test/fortran)
-ADD_TEST (NAME fflush1 COMMAND $<TARGET_FILE:fflush1>)
-
#-- Adding test for fflush2
ADD_EXECUTABLE (fflush2 fflush2.f90)
TARGET_NAMING (fflush2 ${LIB_TYPE})
@@ -161,5 +150,4 @@ ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (fflush2 PROPERTIES LINKER_LANGUAGE Fortran)
SET_TARGET_PROPERTIES (fflush2 PROPERTIES FOLDER test/fortran)
-ADD_TEST (NAME fflush2 COMMAND $<TARGET_FILE:fflush2>)
-SET_TESTS_PROPERTIES(fflush2 PROPERTIES DEPENDS fflush1)
+INCLUDE (CMakeTests.cmake)
diff --git a/fortran/test/CMakeTests.cmake b/fortran/test/CMakeTests.cmake
new file mode 100644
index 0000000..d381b62
--- /dev/null
+++ b/fortran/test/CMakeTests.cmake
@@ -0,0 +1,26 @@
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+ADD_TEST (NAME testhdf5_fortran COMMAND $<TARGET_FILE:testhdf5_fortran>)
+SET_TESTS_PROPERTIES(testhdf5_fortran PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
+
+#-- Adding test for testhdf5_fortran_1_8
+ADD_TEST (NAME testhdf5_fortran_1_8 COMMAND $<TARGET_FILE:testhdf5_fortran_1_8>)
+SET_TESTS_PROPERTIES(testhdf5_fortran_1_8 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
+
+#-- Adding test for fortranlib_test_F03
+IF (HDF5_ENABLE_F2003)
+ ADD_TEST (NAME fortranlib_test_F03 COMMAND $<TARGET_FILE:fortranlib_test_F03>)
+ SET_TESTS_PROPERTIES(fortranlib_test_F03 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
+ENDIF (HDF5_ENABLE_F2003)
+
+#-- Adding test for fflush1
+ADD_TEST (NAME fflush1 COMMAND $<TARGET_FILE:fflush1>)
+
+#-- Adding test for fflush2
+ADD_TEST (NAME fflush2 COMMAND $<TARGET_FILE:fflush2>)
+SET_TESTS_PROPERTIES(fflush2 PROPERTIES DEPENDS fflush1)