diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2013-08-19 21:49:44 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2013-08-19 21:49:44 (GMT) |
commit | c502d81a8c87dd2bce47a5476e3331b04fc69322 (patch) | |
tree | 2549ab26136222cdfae89d4279707051cbb716b0 /hl/fortran | |
parent | fcb21bb3dde491209881dc99eb0adc9198f21452 (diff) | |
download | hdf5-c502d81a8c87dd2bce47a5476e3331b04fc69322.zip hdf5-c502d81a8c87dd2bce47a5476e3331b04fc69322.tar.gz hdf5-c502d81a8c87dd2bce47a5476e3331b04fc69322.tar.bz2 |
[svn-r24029] Move TESTS to seperate file to allow easier editing by all developers.
Tested: local linux
Diffstat (limited to 'hl/fortran')
-rw-r--r-- | hl/fortran/examples/CMakeLists.txt | 10 | ||||
-rw-r--r-- | hl/fortran/examples/CMakeTests.cmake | 10 | ||||
-rw-r--r-- | hl/fortran/test/CMakeLists.txt | 22 | ||||
-rw-r--r-- | hl/fortran/test/CMakeTests.cmake | 28 |
4 files changed, 45 insertions, 25 deletions
diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt index df7fd24..0f663c7 100644 --- a/hl/fortran/examples/CMakeLists.txt +++ b/hl/fortran/examples/CMakeLists.txt @@ -27,8 +27,10 @@ FOREACH (example ${examples}) SET_TARGET_PROPERTIES (hl_f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran) SET_TARGET_PROPERTIES (hl_f90_ex_${example} PROPERTIES FOLDER examples/hl/fortran) - IF (BUILD_TESTING) - ADD_TEST (NAME hl_f90_ex_${example} COMMAND $<TARGET_FILE:hl_f90_ex_${example}>) - ENDIF (BUILD_TESTING) - ENDFOREACH (example ${examples}) + +IF (BUILD_TESTING) + + INCLUDE (CMakeTests.cmake) + +ENDIF (BUILD_TESTING) diff --git a/hl/fortran/examples/CMakeTests.cmake b/hl/fortran/examples/CMakeTests.cmake new file mode 100644 index 0000000..7e6c348 --- /dev/null +++ b/hl/fortran/examples/CMakeTests.cmake @@ -0,0 +1,10 @@ + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + +FOREACH (example ${examples}) + ADD_TEST (NAME hl_f90_ex_${example} COMMAND $<TARGET_FILE:hl_f90_ex_${example}>) +ENDFOREACH (example ${examples}) diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt index 7e7aa1d..2084162 100644 --- a/hl/fortran/test/CMakeLists.txt +++ b/hl/fortran/test/CMakeLists.txt @@ -6,20 +6,6 @@ PROJECT (HDF5_HL_FORTRAN_TESTS C CXX Fortran) #----------------------------------------------------------------------------- INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src) -# Remove any output file left over from previous test run -ADD_TEST ( - NAME hl_fortran_test-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - dsetf1.h5 - dsetf2.h5 - dsetf3.h5 - dsetf4.h5 - dsetf5.h5 - f1image.h5 - f1tab.h5 -) - #-- Adding test for hl_f90_tstds ADD_EXECUTABLE (hl_f90_tstds tstds.f90) TARGET_NAMING (hl_f90_tstds ${LIB_TYPE}) @@ -28,8 +14,6 @@ TARGET_LINK_LIBRARIES (hl_f90_tstds ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TAR SET_TARGET_PROPERTIES (hl_f90_tstds PROPERTIES LINKER_LANGUAGE Fortran) SET_TARGET_PROPERTIES (hl_f90_tstds PROPERTIES FOLDER test/hl/fortran) -ADD_TEST (NAME hl_f90_tstds COMMAND $<TARGET_FILE:hl_f90_tstds>) - #-- Adding test for hl_f90_tstlite ADD_EXECUTABLE (hl_f90_tstlite tstlite.f90) TARGET_NAMING (hl_f90_tstlite ${LIB_TYPE}) @@ -38,8 +22,6 @@ TARGET_LINK_LIBRARIES (hl_f90_tstlite ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_T SET_TARGET_PROPERTIES (hl_f90_tstlite PROPERTIES LINKER_LANGUAGE Fortran) SET_TARGET_PROPERTIES (hl_f90_tstlite PROPERTIES FOLDER test/hl/fortran) -ADD_TEST (NAME hl_f90_tstlite COMMAND $<TARGET_FILE:hl_f90_tstlite>) - #-- Adding test for hl_f90_tstimage ADD_EXECUTABLE (hl_f90_tstimage tstimage.f90) TARGET_NAMING (hl_f90_tstimage ${LIB_TYPE}) @@ -48,8 +30,6 @@ TARGET_LINK_LIBRARIES (hl_f90_tstimage ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB SET_TARGET_PROPERTIES (hl_f90_tstimage PROPERTIES LINKER_LANGUAGE Fortran) SET_TARGET_PROPERTIES (hl_f90_tstimage PROPERTIES FOLDER test/hl/fortran) -ADD_TEST (NAME hl_f90_tstimage COMMAND $<TARGET_FILE:hl_f90_tstimage>) - #-- Adding test for hl_f90_tsttable ADD_EXECUTABLE (hl_f90_tsttable tsttable.f90) TARGET_NAMING (hl_f90_tsttable ${LIB_TYPE}) @@ -58,4 +38,4 @@ TARGET_LINK_LIBRARIES (hl_f90_tsttable ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_ SET_TARGET_PROPERTIES (hl_f90_tsttable PROPERTIES LINKER_LANGUAGE Fortran) SET_TARGET_PROPERTIES (hl_f90_tsttable PROPERTIES FOLDER test/hl/fortran) -ADD_TEST (NAME hl_f90_tsttable COMMAND $<TARGET_FILE:hl_f90_tsttable>) +INCLUDE (CMakeTests.cmake) diff --git a/hl/fortran/test/CMakeTests.cmake b/hl/fortran/test/CMakeTests.cmake new file mode 100644 index 0000000..96209aa --- /dev/null +++ b/hl/fortran/test/CMakeTests.cmake @@ -0,0 +1,28 @@ + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + +# Remove any output file left over from previous test run +ADD_TEST ( + NAME hl_fortran_test-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + dsetf1.h5 + dsetf2.h5 + dsetf3.h5 + dsetf4.h5 + dsetf5.h5 + f1image.h5 + f1tab.h5 +) + +ADD_TEST (NAME hl_f90_tstds COMMAND $<TARGET_FILE:hl_f90_tstds>) + +ADD_TEST (NAME hl_f90_tstlite COMMAND $<TARGET_FILE:hl_f90_tstlite>) + +ADD_TEST (NAME hl_f90_tstimage COMMAND $<TARGET_FILE:hl_f90_tstimage>) + +ADD_TEST (NAME hl_f90_tsttable COMMAND $<TARGET_FILE:hl_f90_tsttable>) |