diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2015-02-16 16:48:34 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2015-02-16 16:48:34 (GMT) |
commit | 820b4dc39136072bccad1455fc0232ec9e710d58 (patch) | |
tree | feaad5d3945808de30f58b19ff1c6fe23efa198d /test | |
parent | 147fa90afae2c3a19501e35dfeb15101bf964b60 (diff) | |
parent | 74fbb9e32794c315bf14a7c29c42c25a6ca2f5f3 (diff) | |
download | hdf5-820b4dc39136072bccad1455fc0232ec9e710d58.zip hdf5-820b4dc39136072bccad1455fc0232ec9e710d58.tar.gz hdf5-820b4dc39136072bccad1455fc0232ec9e710d58.tar.bz2 |
[svn-r26185] merge from trunk.
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeTests.cmake | 93 | ||||
-rw-r--r-- | test/Makefile.in | 1 | ||||
-rw-r--r-- | test/test_plugin.sh.in | 12 |
3 files changed, 89 insertions, 17 deletions
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index f98ab67..f609b7a 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -7,8 +7,8 @@ # make test dir file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST") -file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/tesfiles") -file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/tesfiles/plist_files") +file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/testfiles") +file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/testfiles/plist_files") if (HDF5_TEST_VFD) set (VFD_LIST sec2 @@ -605,23 +605,88 @@ if (HDF5_TEST_VFD) set (H5_VFD_TESTS ${H5_VFD_TESTS} big) endif (NOT CYGWIN) - MACRO (ADD_VFD_TEST vfdname resultcode) - foreach (test ${H5_VFD_TESTS}) + MACRO (CHECK_VFD_TEST vfdtest vfdname resultcode) + if (${vfdtest} STREQUAL "flush1" OR ${vfdtest} STREQUAL "flush2") + if (${vfdname} STREQUAL "multi" OR ${vfdname} STREQUAL "split") + if (NOT BUILD_SHARED_LIBS AND NOT CMAKE_BUILD_TYPE MATCHES Debug) + add_test ( + NAME VFD-${vfdname}-${vfdtest} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}>" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdtest}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} + ) + else (NOT BUILD_SHARED_LIBS AND NOT CMAKE_BUILD_TYPE MATCHES Debug) + add_test ( + NAME VFD-${vfdname}-${vfdtest} + COMMAND ${CMAKE_COMMAND} -E echo "SKIP VFD-${vfdname}-${vfdtest}" + ) + endif(NOT BUILD_SHARED_LIBS AND NOT CMAKE_BUILD_TYPE MATCHES Debug) + else (${vfdname} STREQUAL "multi" OR ${vfdname} STREQUAL "split") + add_test ( + NAME VFD-${vfdname}-${vfdtest} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}>" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdtest}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} + ) + endif (${vfdname} STREQUAL "multi" OR ${vfdname} STREQUAL "split") + else (${vfdtest} STREQUAL "flush1" OR ${vfdtest} STREQUAL "flush2") add_test ( - NAME VFD-${vfdname}-${test} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$<TARGET_FILE:${test}>" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdname}-${test}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + NAME VFD-${vfdname}-${vfdtest} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}>" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdtest}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" ) - set_tests_properties (VFD-${vfdname}-${test} PROPERTIES + set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} ) + endif (${vfdtest} STREQUAL "flush1" OR ${vfdtest} STREQUAL "flush2") + ENDMACRO (CHECK_VFD_TEST vfdtest vfdname resultcode) + + MACRO (ADD_VFD_TEST vfdname resultcode) + foreach (test ${H5_VFD_TESTS}) + if (WIN32) + CHECK_VFD_TEST (${test} ${vfdname} ${resultcode}) + else (WIN32) + add_test ( + NAME VFD-${vfdname}-${test} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$<TARGET_FILE:${test}>" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-${test}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-${test} PROPERTIES + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} + ) + endif (WIN32) endforeach (test ${H5_VFD_TESTS}) set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES DEPENDS VFD-${vfdname}-flush1) set_tests_properties (VFD-${vfdname}-flush1 PROPERTIES TIMEOUT 10) diff --git a/test/Makefile.in b/test/Makefile.in index 8723a03..016544e 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -920,7 +920,6 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ -LARGEFILE = @LARGEFILE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ diff --git a/test/test_plugin.sh.in b/test/test_plugin.sh.in index b268661..a6d8c50 100644 --- a/test/test_plugin.sh.in +++ b/test/test_plugin.sh.in @@ -28,8 +28,16 @@ exit_code=$EXIT_SUCCESS TEST_NAME=plugin TEST_BIN=`pwd`/$TEST_NAME FROM_DIR=`pwd`/.libs -PLUGIN_LIB1="$FROM_DIR/libdynlib1.* $FROM_DIR/libdynlib3.*" -PLUGIN_LIB2="$FROM_DIR/libdynlib2.*" +case $(uname) in + CYGWIN* ) + PLUGIN_LIB1="$FROM_DIR/cygdynlib1* $FROM_DIR/cygdynlib3*" + PLUGIN_LIB2="$FROM_DIR/cygdynlib2*" + ;; + *) + PLUGIN_LIB1="$FROM_DIR/libdynlib1.* $FROM_DIR/libdynlib3.*" + PLUGIN_LIB2="$FROM_DIR/libdynlib2.*" + :: +esac PLUGIN_LIBDIR1=testdir1 PLUGIN_LIBDIR2=testdir2 CP="cp -p" # Use -p to preserve mode,ownership,timestamps |