diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2014-02-03 21:59:26 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2014-02-03 21:59:26 (GMT) |
commit | ea30f2156b29d7754eae6a58e8824f121f5e2d39 (patch) | |
tree | a5ebdf8f8e8e574fb923aba08f8ace225cdd6fef /tools | |
parent | 960dbc91698709e532d4cab06ef653f175fb57d0 (diff) | |
download | hdf5-ea30f2156b29d7754eae6a58e8824f121f5e2d39.zip hdf5-ea30f2156b29d7754eae6a58e8824f121f5e2d39.tar.gz hdf5-ea30f2156b29d7754eae6a58e8824f121f5e2d39.tar.bz2 |
[svn-r24680] Remove acknowledgment file from install.
Remove obsolete CPack.cmake file.
Merge h5repack and h5mkgrp test folder changes from trunk.
Tested: local linux
Diffstat (limited to 'tools')
-rw-r--r-- | tools/h5repack/CMakeTests.cmake | 48 | ||||
-rw-r--r-- | tools/h5repack/h5repack.sh.in | 59 | ||||
-rw-r--r-- | tools/h5repack/h5repack_plugin.sh.in | 50 | ||||
-rw-r--r-- | tools/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl | 2 | ||||
-rw-r--r-- | tools/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl | 2 | ||||
-rw-r--r-- | tools/misc/testh5mkgrp.sh.in | 2 |
6 files changed, 89 insertions, 74 deletions
diff --git a/tools/h5repack/CMakeTests.cmake b/tools/h5repack/CMakeTests.cmake index 7f8f71b..46d46aa 100644 --- a/tools/h5repack/CMakeTests.cmake +++ b/tools/h5repack/CMakeTests.cmake @@ -206,12 +206,12 @@ NAME H5REPACK_CMP-${testname} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$<TARGET_FILE:h5repack>" - -D "TEST_ARGS:STRING=${ARGN};testfiles/${resultfile};testfiles/out-${testname}.${resultfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=./testfiles/${resultfile}-${testname}.out" + -D "TEST_ARGS:STRING=${ARGN};${resultfile};out-${testname}.${resultfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${resultfile}-${testname}.out" -D "TEST_EXPECT=${resultcode}" -D "TEST_FILTER:STRING=${testfilter}" - -D "TEST_REFERENCE=testfiles/${resultfile}.tst" + -D "TEST_REFERENCE=${resultfile}.tst" -P "${HDF5_RESOURCES_DIR}/runTest.cmake" ) ENDIF (HDF5_ENABLE_USING_MEMCHECKER) @@ -242,11 +242,11 @@ NAME H5REPACK_DMP-h5dump-${testname} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>" - -D "TEST_ARGS:STRING=-pH;./testfiles/out-${testname}.${resultfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=./testfiles/${resultfile}-${testname}.out" + -D "TEST_ARGS:STRING=-pH;out-${testname}.${resultfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${resultfile}-${testname}.out" -D "TEST_EXPECT=${resultcode}" - -D "TEST_REFERENCE=testfiles/${testname}.${resultfile}.ddl" + -D "TEST_REFERENCE=${testname}.${resultfile}.ddl" -P "${HDF5_RESOURCES_DIR}/runTest.cmake" ) SET_TESTS_PROPERTIES (H5REPACK_DMP-h5dump-${testname} PROPERTIES DEPENDS "H5REPACK_DMP-${testname}") @@ -281,9 +281,9 @@ NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>" - -D "TEST_ARGS:STRING=-d;${testdset};-pH;testfiles/out-${testname}.${testfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=./testfiles/${testfile}-${testname}-v.out" + -D "TEST_ARGS:STRING=-d;${testdset};-pH;out-${testname}.${testfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${testfile}-${testname}-v.out" -D "TEST_EXPECT=${resultcode}" -D "TEST_FILTER:STRING=${testfilter}" -D "TEST_REFERENCE=${testfilter}" @@ -304,9 +304,9 @@ NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>" - -D "TEST_ARGS:STRING=-pH;testfiles/out-${testname}.${testfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=./testfiles/${testfile}-${testname}-v.out" + -D "TEST_ARGS:STRING=-pH;out-${testname}.${testfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${testfile}-${testname}-v.out" -D "TEST_EXPECT=${resultcode}" -D "TEST_FILTER:STRING=${nottestfilter}" -D "TEST_REFERENCE=${testfilter}" @@ -341,7 +341,7 @@ IF (HDF5_BUILD_TOOLS AND NOT HDF5_ENABLE_USING_MEMCHECKER) # Remove any output file left over from previous test run ADD_TEST ( - NAME H5REPACK_UD-clearall-objects + NAME H5REPACK_UD-${testname}-clearall-objects COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${resultfile} @@ -354,26 +354,26 @@ NAME H5REPACK_UD-${testname} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$<TARGET_FILE:h5repack>" - -D "TEST_ARGS:STRING=${ARGN};${PROJECT_BINARY_DIR}/testfiles/${resultfile};${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_ARGS:STRING=${ARGN};${resultfile};out-${testname}.${resultfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" -D "TEST_EXPECT=${resultcode}" -D "TEST_FILTER:STRING=O?...ing file[^\n]+\n" - -D "TEST_OUTPUT=./testfiles/${testname}.${resultfile}.out" - -D "TEST_REFERENCE=testfiles/${testname}.${resultfile}.tst" + -D "TEST_OUTPUT=${testname}.${resultfile}.out" + -D "TEST_REFERENCE=${testname}.${resultfile}.tst" -D "TEST_ENV_VAR=HDF5_PLUGIN_PATH" -D "TEST_ENV_VALUE=${CMAKE_BINARY_DIR}/plugins" -P "${HDF5_RESOURCES_DIR}/runTest.cmake" ) - SET_TESTS_PROPERTIES (H5REPACK_UD-${testname} PROPERTIES DEPENDS H5REPACK_UD-clearall-objects) + SET_TESTS_PROPERTIES (H5REPACK_UD-${testname} PROPERTIES DEPENDS H5REPACK_UD-${testname}-clearall-objects) ADD_TEST ( NAME H5REPACK_UD-h5dump-${testname} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>" - -D "TEST_ARGS:STRING=-pH;testfiles/out-${testname}.${resultfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=./testfiles/${resultfile}-${testname}.out" + -D "TEST_ARGS:STRING=-pH;out-${testname}.${resultfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${resultfile}-${testname}.out" -D "TEST_EXPECT=${resultcode}" - -D "TEST_REFERENCE=testfiles/${resultfile}-${testname}.ddl" + -D "TEST_REFERENCE=${resultfile}-${testname}.ddl" -D "TEST_ENV_VAR=HDF5_PLUGIN_PATH" -D "TEST_ENV_VALUE=${CMAKE_BINARY_DIR}/plugins" -P "${HDF5_RESOURCES_DIR}/runTest.cmake" diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in index 045aebf..a4d12bd 100644 --- a/tools/h5repack/h5repack.sh.in +++ b/tools/h5repack/h5repack.sh.in @@ -70,7 +70,7 @@ SRC_H5JAM_TESTFILES="$SRC_TOOLS/h5jam/testfiles" SRC_H5STAT_TESTFILES="$SRC_TOOLS/h5stat/testfiles" SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/h5import/testfiles" -TESTDIR=./testfiles +TESTDIR=./testpack test -d $TESTDIR || mkdir $TESTDIR ###################################################################### @@ -209,6 +209,7 @@ DIFFTEST() { VERIFY h5diff output $@ ( + cd $TESTDIR $RUNSERIAL $H5DIFF_BIN -q "$@" ) RET=$? @@ -229,14 +230,15 @@ DIFFTEST() TOOLTEST() { echo $@ - infile=$TESTDIR/$2 - outfile=$TESTDIR/out-$1.$2 + infile=$2 + outfile=out-$1.$2 shift shift # Run test. TESTING $H5REPACK $@ ( + cd $TESTDIR $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile ) RET=$? @@ -254,11 +256,11 @@ TOOLTEST() # Verifying layouts of a dataset VERIFY_LAYOUT_DSET() { - layoutfile=$TESTDIR/layout-$1.$2 + layoutfile=layout-$1.$2 dset=$3 expectlayout=$4 - infile=$TESTDIR/$2 - outfile=$TESTDIR/out-$1.$2 + infile=$2 + outfile=out-$1.$2 shift shift shift @@ -266,6 +268,7 @@ VERIFY_LAYOUT_DSET() TESTING $H5REPACK $@ ( + cd $TESTDIR $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile ) RET=$? @@ -281,9 +284,10 @@ VERIFY_LAYOUT_DSET() # check the layout from a dataset VERIFY "a dataset layout" ( + cd $TESTDIR $RUNSERIAL $H5DUMP_BIN -d $dset -pH $outfile > $layoutfile ) - $GREP $expectlayout $layoutfile > /dev/null + $GREP $expectlayout $TESTDIR/$layoutfile > /dev/null if [ $? -eq 0 ]; then echo " PASSED" else @@ -301,8 +305,8 @@ VERIFY_LAYOUT_DSET() VERIFY_LAYOUT_ALL() { infile=$2 - outfile=$TESTDIR/out-$1.$2 - layoutfile=$TESTDIR/layout-$1.$2 + outfile=out-$1.$2 + layoutfile=layout-$1.$2 expectlayout=$3 shift shift @@ -310,6 +314,7 @@ VERIFY_LAYOUT_ALL() TESTING $H5REPACK $@ ( + cd $TESTDIR $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile ) RET=$? @@ -327,6 +332,7 @@ VERIFY_LAYOUT_ALL() # check if the other layouts still exsit VERIFY "layouts" ( + cd $TESTDIR echo # if CONTIGUOUS if [ $expectlayout = "CONTIGUOUS" ]; then @@ -401,14 +407,15 @@ VERIFY_LAYOUT_ALL() # TOOLTEST0() { - infile=$TESTDIR/$2 - outfile=$TESTDIR/out-$1.$2 + infile=$2 + outfile=out-$1.$2 shift shift # Run test. TESTING $H5REPACK $@ ( + cd $TESTDIR $RUNSERIAL $H5REPACK_BIN -i $infile -o $outfile "$@" ) RET=$? @@ -428,14 +435,15 @@ TOOLTEST0() # TOOLTEST1() { - infile=$TESTDIR/$2 - outfile=$TESTDIR/out-$1.$2 + infile=$2 + outfile=out-$1.$2 shift shift # Run test. TESTING $H5REPACK $@ ( + cd $TESTDIR $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile ) RET=$? @@ -458,14 +466,15 @@ TOOLTESTV() actual="$TESTDIR/`basename $2 .ddl`.out" actual_err="$TESTDIR/`basename $2 .ddl`.err" - infile=$TESTDIR/$2 - outfile=$TESTDIR/out-$1.$2 + infile=$2 + outfile=out-$1.$2 shift shift # Run test. TESTING $H5REPACK $@ ( + cd $TESTDIR $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile ) >$actual 2>$actual_err RET=$? @@ -500,8 +509,8 @@ TOOLTESTV() # TOOLTEST_DUMP() { - infile=$TESTDIR/$2 - outfile=$TESTDIR/out-$1.$2 + infile=$2 + outfile=out-$1.$2 expect="$TESTDIR/$1.$2.ddl" actual="$TESTDIR/out-$1.$2.out" actual_err="$TESTDIR/out-$1.$2.err" @@ -512,6 +521,7 @@ TOOLTEST_DUMP() # Run test. TESTING $H5REPACK $@ ( + cd $TESTDIR $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile ) >$actual 2>$actual_err RET=$? @@ -522,6 +532,7 @@ TOOLTEST_DUMP() echo " PASSED" VERIFY h5dump output $@ ( + cd $TESTDIR $RUNSERIAL $H5DUMP_BIN -pH $outfile ) >$actual 2>$actual_err cat $actual_err >> $actual @@ -559,14 +570,15 @@ TOOLTEST_DUMP() # Verify the output file of second run is larger than the one of 1st run. TOOLTEST_META() { - infile=$TESTDIR/$2 - outfile=$TESTDIR/out-$1.$2 + infile=$2 + outfile=out-$1.$2 shift shift # Run test. TESTING $H5REPACK $@ ( + cd $TESTDIR $RUNSERIAL $H5REPACK_BIN $infile $outfile ) RET=$? @@ -578,12 +590,13 @@ TOOLTEST_META() DIFFTEST $infile $outfile fi # get the size of the first output file - size1=`wc -c $outfile | cut -d' ' -f1` + size1=`wc -c $TESTDIR/$outfile | cut -d' ' -f1` # 2nd run with metadata option # Run test. TESTING $H5REPACK $@ ( + cd $TESTDIR $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile ) RET=$? @@ -595,7 +608,7 @@ TOOLTEST_META() DIFFTEST $infile $outfile fi # get the size of the second output file - size2=`wc -c $outfile | cut -d' ' -f1` + size2=`wc -c $TESTDIR/$outfile | cut -d' ' -f1` # verify sizes. MESSAGE "Verify the sizes of both output files ($size1 vs $size2)" @@ -927,7 +940,7 @@ else fi #file -arg="h5repack_layout.h5 -e $TESTDIR/h5repack.info" +arg="h5repack_layout.h5 -e h5repack.info" if test $USE_FILTER_DEFLATE != "yes" ; then SKIP $arg else @@ -1064,7 +1077,7 @@ else fi # add a userblock to file -arg="h5repack_objs.h5 -u $TESTDIR/ublock.bin -b 2048" +arg="h5repack_objs.h5 -u ublock.bin -b 2048" TOOLTEST add_userblock $arg # add alignment diff --git a/tools/h5repack/h5repack_plugin.sh.in b/tools/h5repack/h5repack_plugin.sh.in index df4b374..750b05b 100644 --- a/tools/h5repack/h5repack_plugin.sh.in +++ b/tools/h5repack/h5repack_plugin.sh.in @@ -49,7 +49,7 @@ SRC_TOOLS="$srcdir/.." # testfiles source dirs for tools SRC_H5REPACK_TESTFILES="$SRC_TOOLS/h5repack/testfiles" -TESTDIR=testfiles +TESTDIR=testplug test -d $TESTDIR || mkdir $TESTDIR ###################################################################### @@ -88,7 +88,7 @@ if [ $? != 0 ]; then fi # setup plugin path -ENVCMD="env HDF5_PLUGIN_PATH=${PLUGIN_LIBDIR}" +ENVCMD="env HDF5_PLUGIN_PATH=../${PLUGIN_LIBDIR}" COPY_TESTFILES_TO_TESTDIR() { @@ -171,8 +171,8 @@ STDOUT_FILTER() { TOOLTEST_DUMP() { echo $@ - infile=$TESTDIR/$2 - outfile=$TESTDIR/out-$1.$2 + infile=$2 + outfile=out-$1.$2 expect1="$TESTDIR/$1.$2.tst" actual1="$TESTDIR/$1.$2.out" actual1_err="$TESTDIR/$1.$2.err" @@ -186,35 +186,37 @@ TOOLTEST_DUMP() # Run test. TESTING $H5REPACK $@ ( - $ENVCMD $H5REPACK_BIN "$@" $infile $outfile + cd $TESTDIR + $ENVCMD $H5REPACK_BIN "$@" $infile $outfile ) >$actual1 2>$actual1_err RET=$? STDOUT_FILTER $actual1 cat $actual1_err >> $actual1 if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - if cmp -s $expect1 $actual1; then - echo " PASSED" - else echo "*FAILED*" - echo " Expected result (*.tst) differs from actual result (*.out)" nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && diff -c $expect1 $actual1 |sed 's/^/ /' - fi - VERIFY h5dump output -pH $outfile - ( + else + echo " PASSED" + if cmp -s $expect1 $actual1; then + echo " PASSED" + else + echo "*FAILED*" + echo " Expected result (*.tst) differs from actual result (*.out)" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && diff -c $expect1 $actual1 |sed 's/^/ /' + fi + VERIFY h5dump output -pH $outfile + ( + cd $TESTDIR $ENVCMD $H5DUMP_BIN -pH $outfile - ) >$actual2 2>$actual2_err - RET=$? - cat $actual2_err >> $actual2 + ) >$actual2 2>$actual2_err + RET=$? + cat $actual2_err >> $actual2 - if cmp -s $expect2 $actual2; then - echo " PASSED" - else - echo "*FAILED*" + if cmp -s $expect2 $actual2; then + echo " PASSED" + else + echo "*FAILED*" echo " Expected result (*.ddl) differs from actual result (*.out)" nerrors="`expr $nerrors + 1`" test yes = "$verbose" && diff -c $expect2 $actual2 |sed 's/^/ /' diff --git a/tools/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl b/tools/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl index d380201..b8e7e68 100644 --- a/tools/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl +++ b/tools/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl @@ -1,4 +1,4 @@ -HDF5 "./testfiles/out-deflate_limit.h5repack_layout.h5" { +HDF5 "out-deflate_limit.h5repack_layout.h5" { GROUP "/" { DATASET "dset1" { DATATYPE H5T_STD_I32LE diff --git a/tools/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl b/tools/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl index a7ba967..7a3a01e 100644 --- a/tools/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl +++ b/tools/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl @@ -1,4 +1,4 @@ -HDF5 "testfiles/out-plugin_test.h5repack_layout.h5" { +HDF5 "out-plugin_test.h5repack_layout.h5" { GROUP "/" { DATASET "dset1" { DATATYPE H5T_STD_I32LE diff --git a/tools/misc/testh5mkgrp.sh.in b/tools/misc/testh5mkgrp.sh.in index 85205a8..190e824 100644 --- a/tools/misc/testh5mkgrp.sh.in +++ b/tools/misc/testh5mkgrp.sh.in @@ -49,7 +49,7 @@ SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles" # testfiles source dirs for tools SRC_H5MKGRP_TESTFILES="$SRC_TOOLS/misc/testfiles" -TESTDIR=./testfiles +TESTDIR=./testgrp test -d $TESTDIR || mkdir -p $TESTDIR ###################################################################### |