[svn-r21901] Purpose:

HDFFV-7602 - GMQS: HDF5 command tools: Provide framework for reusable test files among tools
  Stage2 working for h5repack cmake test.

Description:
  Update cmake script to clean up correctly.
  Revisit h5repack cmake test script updated from r21870.
  Also sync with HDF5 trunk. (Jira 2605)
  
Tested:
 cmake test for Windows (32-LE) and jam (linux32-LE)
This commit is contained in:
Jonathan Kim
2012-01-30 13:31:12 -05:00
parent f59e450d9c
commit 66be4be4e5

View File

@@ -85,7 +85,7 @@ IF (BUILD_TESTING)
# --------------------------------------------------------------------
SET (LIST_HDF5_TEST_FILES
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_attr.h5
#${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_attr_refs.h5
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_attr_refs.h5
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_deflate.h5
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_early.h5
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_ext.h5
@@ -189,7 +189,7 @@ IF (BUILD_TESTING)
-D "TEST_PROGRAM=$<TARGET_FILE:h5repack>"
-D "TEST_ARGS:STRING=${ARGN};testfiles/${resultfile};testfiles/out.${resultfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${resultfile}.out"
-D "TEST_OUTPUT=./testfiles/${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_FILTER:STRING=${testfilter}"
-D "TEST_REFERENCE=testfiles/${resultfile}.ddl"
@@ -220,7 +220,7 @@ IF (BUILD_TESTING)
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
-D "TEST_ARGS:STRING=-d;${testdset};-pH;testfiles/out.${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${testfile}-v.out"
-D "TEST_OUTPUT=./testfiles/${testfile}-v.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_FILTER:STRING=${testfilter}"
-D "TEST_REFERENCE=${testfilter}"
@@ -246,7 +246,7 @@ IF (BUILD_TESTING)
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
-D "TEST_ARGS:STRING=-pH;testfiles/out.${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${testfile}-v.out"
-D "TEST_OUTPUT=./testfiles/${testfile}-v.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_FILTER:STRING=${nottestfilter}"
-D "TEST_REFERENCE=${testfilter}"
@@ -272,65 +272,69 @@ IF (BUILD_TESTING)
NAME H5REPACK-clearall-objects
COMMAND ${CMAKE_COMMAND}
-E remove
h5repack_attr.h5.out
h5repack_attr.h5.out.err
h5repack_deflate.h5.out
h5repack_deflate.h5.out.err
h5repack_early.h5.out
h5repack_early.h5.out.err
h5repack_ext.h5.out
h5repack_ext.h5.out.err
h5repack_fill.h5.out
h5repack_fill.h5.out.err
h5repack_filters.h5.out
h5repack_filters.h5.out.err
h5repack_fletcher.h5.out
h5repack_fletcher.h5.out.err
h5repack_hlink.h5.out
h5repack_hlink.h5.out.err
h5repack_layout.h5.out
h5repack_layout.h5.out.err
h5repack_layout.h5-v.out
h5repack_layout.h5-v.out.err
h5repack_layouto.h5.out
h5repack_layouto.h5.out.err
h5repack_layout2.h5-v.out
h5repack_layout2.h5-v.out.err
h5repack_named_dtypes.h5.out
h5repack_named_dtypes.h5.out.err
h5repack_nbit.h5.out
h5repack_nbit.h5.out.err
h5repack_objs.h5.out
h5repack_objs.h5.out.err
h5repack_refs.h5.out
h5repack_refs.h5.out.err
h5repack_shuffle.h5.out
h5repack_shuffle.h5.out.err
h5repack_soffset.h5.out
h5repack_soffset.h5.out.err
h5repack_szip.h5.out
h5repack_szip.h5.out.err
h5repack_attr_out.h5
h5repack_deflate_out.h5
h5repack_early_out.h5
h5repack_ext_out.h5
h5repack_fill_out.h5
h5repack_filters_out.h5
h5repack_fletcher_out.h5
h5repack_hlink_out.h5
h5repack_layout_out.h5
h5repack_layouto_out.h5
h5repack_layout2_out.h5
h5repack_named_dtypes_out.h5
h5repack_nbit_out.h5
h5repack_objs_out.h5
h5repack_refs_out.h5
h5repack_shuffle_out.h5
h5repack_soffset_out.h5
h5repack_szip_out.h5
h5repack_ub.h5
h5repack_ub_out.h5
h5diff_attr1_out.h5
./testfiles/h5repack_filters.h5.out
./testfiles/h5repack_filters.h5.out.err
./testfiles/h5repack_layout2.h5-v.out
./testfiles/h5repack_layout2.h5-v.out.err
./testfiles/h5repack_layout.h5-v.out
./testfiles/h5repack_layout.h5-v.out.err
./testfiles/out.h5diff_attr1.h5
./testfiles/out.h5repack_attr.h5
./testfiles/out.h5repack_deflate.h5
./testfiles/out.h5repack_early.h5
./testfiles/out.h5repack_fill.h5
./testfiles/out.h5repack_filters.h5
./testfiles/out.h5repack_fletcher.h5
./testfiles/out.h5repack_hlink.h5
./testfiles/out.h5repack_layout2.h5
./testfiles/out.h5repack_layout.h5
./testfiles/out.h5repack_layouto.h5
./testfiles/out.h5repack_named_dtypes.h5
./testfiles/out.h5repack_nbit.h5
./testfiles/out.h5repack_objs.h5
./testfiles/out.h5repack_refs.h5
./testfiles/out.h5repack_shuffle.h5
./testfiles/out.h5repack_soffset.h5
# from the h5repacktst
h5repack_attr.h5
h5repack_attr_out.h5
h5repack_attr_refs.h5
h5repack_big.h5
h5repack_deflate.h5
h5repack_deflate_out.h5
h5repack_early2.h5
h5repack_early.h5
h5repack_early_out.h5
h5repack_ext.h5
h5repack_ext_out.h5
h5repack_fill.h5
h5repack_fill_out.h5
h5repack_filters.h5
h5repack_filters_out.h5
h5repack_fletcher.h5
h5repack_fletcher_out.h5
h5repack_hlink.h5
h5repack_hlink_out.h5
h5repack_layout2.h5
h5repack_layout.h5
h5repack_layout_out.h5
h5repack_named_dtypes.h5
h5repack_named_dtypes_out.h5
h5repack_nbit.h5
h5repack_nbit_out.h5
h5repack_objs.h5
h5repack_objs_out.h5
h5repack_refs.h5
h5repack_shuffle.h5
h5repack_shuffle_out.h5
h5repack_soffset.h5
h5repack_soffset_out.h5
h5repack_szip.h5
h5repack_szip_out.h5
h5repack_ub.h5
h5repack_ub_out.h5
h5repack_ext.bin
ublock.bin
)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5REPACK-clearall-objects PROPERTIES DEPENDS ${last_test})
@@ -360,6 +364,7 @@ IF (BUILD_TESTING)
SET (FILE16 tfamily%05d.h5) # located in common testfiles folder
SET (FILE18 h5repack_layout2.h5)
SET (FILE_REF h5repack_refs.h5)
SET (FILE_ATTR_REF h5repack_attr_refs.h5)
ADD_TEST (NAME H5REPACK-testh5repack_detect_szip COMMAND $<TARGET_FILE:testh5repack_detect_szip>)
IF (HDF5_ENABLE_SZIP_SUPPORT)
@@ -783,6 +788,12 @@ IF (BUILD_TESTING)
# test various references (bug 1814 and 1726)
ADD_H5_TEST (bug1814 "TEST" ${FILE_REF})
# test attribute with various references in attribute of compund
# or vlen datatype
# (HDFFV-2605, 7513)
# TODO: include this test when code portion is completed.
ADD_H5_TEST (HDFFV-2605 "SKIP" ${FILE_ATTR_REF})
# Add test for memory leak in attirbute. This test is verified by CTEST.
# 1. leak from vlen string
# 2. leak from compound type without reference member