mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-04-24 17:51:25 +08:00
[svn-r22617] Purpose:
Fix for HDFFV-8107 testh5diff will fail if build/test in HDF5 source tree Description: This is sub-task for "HDFFV-8105 testh5diff.sh uses the wrong operator (-a) in an if statement." From the HDFFV-8105's update, h5diff test failed if build&test is performed in HDF5 source tree because 'cp' try to copy test files to self dir. It's addressed by skipping if cp's src dir and dest dir is same. Also this applied for all other tools under src/tools dir. No change to the CMakeLists.txt files because CMake cautions/demands that in-source builds be avoided. Tested: jam (linux32-LE), koala (linux64-LE), ostrich (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE), some manual tests as well
This commit is contained in:
parent
d4d9cbd52d
commit
840ad09105
release_docs
tools
h5copy
h5diff
h5dump
h5import
h5jam
h5ls
h5repack
h5stat
@ -705,6 +705,10 @@ Bug Fixes since HDF5-1.8.0 release
|
||||
|
||||
Tools
|
||||
-----
|
||||
- h5diff: Fixed test failure for "make check" due to failure of
|
||||
copying test files when performed in HDF5 source tree. Also applied
|
||||
to other tools.
|
||||
HDFFV-8107 (JKM 2012/08/01)
|
||||
- h5diff: Fixed the Function COPY_TESTFILES_TO_TESTDIR() of
|
||||
testh5diff.sh to better report when there is an error in the file
|
||||
copying. HDFFV-8105 (AKC -2012/07/22)
|
||||
|
@ -76,6 +76,9 @@ H5LS_BIN=`pwd`/../h5ls/$H5LS # The path of the h5ls tool binary
|
||||
CMP='cmp -s'
|
||||
DIFF='diff -c'
|
||||
CP='cp'
|
||||
DIRNAME='dirname'
|
||||
LS='ls'
|
||||
AWK='awk'
|
||||
|
||||
nerrors=0
|
||||
verbose=yes
|
||||
@ -105,17 +108,26 @@ COPY_TESTFILES_TO_TESTDIR()
|
||||
echo $tstfile | tr -d ' ' | grep '^#' > /dev/null
|
||||
RET=$?
|
||||
if [ $RET -eq 1 ]; then
|
||||
if [ -a $tstfile ]; then
|
||||
$CP -f $tstfile $TESTDIR
|
||||
else
|
||||
echo "Error: FAILED to copy $tstfile."
|
||||
echo " $tstfile doesn't exist!"
|
||||
exit $EXIT_FAILURE
|
||||
# skip cp if srcdir is same as destdir
|
||||
# this occurs when build/test performed in source dir and
|
||||
# make cp fail
|
||||
SDIR=`$DIRNAME $tstfile`
|
||||
INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
|
||||
INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'`
|
||||
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
|
||||
$CP -f $tstfile $TESTDIR
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: FAILED to copy $tstfile ."
|
||||
|
||||
# Comment out this to CREATE expected file
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
# Print a "SKIP" message
|
||||
SKIP() {
|
||||
TESTING $H5COPY $@
|
||||
|
@ -41,6 +41,9 @@ H5DIFF_BIN=`pwd`/$H5DIFF # The path of the tool binary
|
||||
CMP='cmp -s'
|
||||
DIFF='diff -c'
|
||||
CP='cp'
|
||||
DIRNAME='dirname'
|
||||
LS='ls'
|
||||
AWK='awk'
|
||||
|
||||
nerrors=0
|
||||
verbose=yes
|
||||
@ -318,12 +321,20 @@ COPY_TESTFILES_TO_TESTDIR()
|
||||
echo $tstfile | tr -d ' ' | grep '^#' > /dev/null
|
||||
RET=$?
|
||||
if [ $RET -eq 1 ]; then
|
||||
$CP -f $tstfile $TESTDIR
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: FAILED to copy $tstfile ."
|
||||
# skip cp if srcdir is same as destdir
|
||||
# this occurs when build/test performed in source dir and
|
||||
# make cp fail
|
||||
SDIR=`$DIRNAME $tstfile`
|
||||
INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
|
||||
INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'`
|
||||
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
|
||||
$CP -f $tstfile $TESTDIR
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: FAILED to copy $tstfile ."
|
||||
|
||||
# Comment out this to CREATE expected file
|
||||
exit $EXIT_FAILURE
|
||||
# Comment out this to CREATE expected file
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
@ -40,6 +40,9 @@ H5IMPORT_BIN=`pwd`/$H5IMPORT # The path of the h5import tool binary
|
||||
CMP='cmp -s'
|
||||
DIFF='diff -c'
|
||||
CP='cp'
|
||||
DIRNAME='dirname'
|
||||
LS='ls'
|
||||
AWK='awk'
|
||||
|
||||
nerrors=0
|
||||
verbose=yes
|
||||
@ -351,18 +354,25 @@ COPY_TESTFILES_TO_TESTDIR()
|
||||
echo $tstfile | tr -d ' ' | grep '^#' > /dev/null
|
||||
RET=$?
|
||||
if [ $RET -eq 1 ]; then
|
||||
if [ -a $tstfile ]; then
|
||||
$CP -f $tstfile $TESTDIR
|
||||
else
|
||||
echo "Error: FAILED to copy $tstfile"
|
||||
echo " $tstfile doesn't exist!"
|
||||
exit $EXIT_FAILURE
|
||||
# skip cp if srcdir is same as destdir
|
||||
# this occurs when build/test performed in source dir and
|
||||
# make cp fail
|
||||
SDIR=`$DIRNAME $tstfile`
|
||||
INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
|
||||
INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'`
|
||||
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
|
||||
$CP -f $tstfile $TESTDIR
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: FAILED to copy $tstfile ."
|
||||
|
||||
# Comment out this to CREATE expected file
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
# Print a line-line message left justified in a field of 70 characters
|
||||
# beginning with the word "Testing".
|
||||
#
|
||||
|
@ -40,6 +40,9 @@ H5IMPORT_BIN=`pwd`/$H5IMPORT # The path of the h5import tool binary
|
||||
CMP='cmp -s'
|
||||
DIFF='diff -c'
|
||||
CP='cp'
|
||||
DIRNAME='dirname'
|
||||
LS='ls'
|
||||
AWK='awk'
|
||||
|
||||
nerrors=0
|
||||
verbose=yes
|
||||
@ -165,18 +168,25 @@ COPY_TESTFILES_TO_TESTDIR()
|
||||
echo $tstfile | tr -d ' ' | grep '^#' > /dev/null
|
||||
RET=$?
|
||||
if [ $RET -eq 1 ]; then
|
||||
if [ -a $tstfile ]; then
|
||||
$CP -f $tstfile $TESTDIR
|
||||
else
|
||||
echo "Error: FAILED to copy $tstfile"
|
||||
echo " $tstfile doesn't exist!"
|
||||
exit $EXIT_FAILURE
|
||||
# skip cp if srcdir is same as destdir
|
||||
# this occurs when build/test performed in source dir and
|
||||
# make cp fail
|
||||
SDIR=`$DIRNAME $tstfile`
|
||||
INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
|
||||
INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'`
|
||||
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
|
||||
$CP -f $tstfile $TESTDIR
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: FAILED to copy $tstfile ."
|
||||
|
||||
# Comment out this to CREATE expected file
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
# Print a line-line message left justified in a field of 70 characters
|
||||
# beginning with the word "Testing".
|
||||
#
|
||||
|
@ -27,6 +27,9 @@ DUMPER_BIN=`pwd`/$DUMPER # The path of the tool binary
|
||||
CMP='cmp -s'
|
||||
DIFF='diff -c'
|
||||
CP='cp'
|
||||
DIRNAME='dirname'
|
||||
LS='ls'
|
||||
AWK='awk'
|
||||
|
||||
nerrors=0
|
||||
verbose=yes
|
||||
@ -195,12 +198,20 @@ COPY_TESTFILES_TO_TESTDIR()
|
||||
echo $tstfile | tr -d ' ' | grep '^#' > /dev/null
|
||||
RET=$?
|
||||
if [ $RET -eq 1 ]; then
|
||||
if [ -a $tstfile ]; then
|
||||
$CP -f $tstfile $TESTDIR
|
||||
else
|
||||
echo "Error: FAILED to copy $tstfile"
|
||||
echo " $tstfile doesn't exist!"
|
||||
exit $EXIT_FAILURE
|
||||
# skip cp if srcdir is same as destdir
|
||||
# this occurs when build/test performed in source dir and
|
||||
# make cp fail
|
||||
SDIR=`$DIRNAME $tstfile`
|
||||
INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
|
||||
INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'`
|
||||
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
|
||||
$CP -f $tstfile $TESTDIR
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: FAILED to copy $tstfile ."
|
||||
|
||||
# Comment out this to CREATE expected file
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
@ -24,6 +24,9 @@ EXIT_SUCCESS=0
|
||||
EXIT_FAILURE=1
|
||||
|
||||
CP='cp'
|
||||
DIRNAME='dirname'
|
||||
LS='ls'
|
||||
AWK='awk'
|
||||
|
||||
# initialize errors variable
|
||||
nerrors=0
|
||||
@ -128,12 +131,20 @@ COPY_TESTFILES_TO_TESTDIR()
|
||||
echo $tstfile | tr -d ' ' | grep '^#' > /dev/null
|
||||
RET=$?
|
||||
if [ $RET -eq 1 ]; then
|
||||
if [ -a $tstfile ]; then
|
||||
$CP -f $tstfile $TESTDIR
|
||||
else
|
||||
echo "Error: FAILED to copy $tstfile"
|
||||
echo " $tstfile doesn't exist!"
|
||||
exit $EXIT_FAILURE
|
||||
# skip cp if srcdir is same as destdir
|
||||
# this occurs when build/test performed in source dir and
|
||||
# make cp fail
|
||||
SDIR=`$DIRNAME $tstfile`
|
||||
INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
|
||||
INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'`
|
||||
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
|
||||
$CP -f $tstfile $TESTDIR
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: FAILED to copy $tstfile ."
|
||||
|
||||
# Comment out this to CREATE expected file
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
@ -36,6 +36,9 @@ CMP='cmp -s'
|
||||
DIFF='diff -c'
|
||||
AWK='awk'
|
||||
CP='cp'
|
||||
DIRNAME='dirname'
|
||||
LS='ls'
|
||||
AWK='awk'
|
||||
|
||||
nerrors=0
|
||||
verbose=yes
|
||||
@ -103,12 +106,20 @@ COPY_TESTFILES_TO_TESTDIR()
|
||||
echo $tstfile | tr -d ' ' | grep '^#' > /dev/null
|
||||
RET=$?
|
||||
if [ $RET -eq 1 ]; then
|
||||
if [ -a $tstfile ]; then
|
||||
$CP -f $tstfile $TESTDIR
|
||||
else
|
||||
echo "Error: FAILED to copy $tstfile"
|
||||
echo " $tstfile doesn't exist!"
|
||||
exit $EXIT_FAILURE
|
||||
# skip cp if srcdir is same as destdir
|
||||
# this occurs when build/test performed in source dir and
|
||||
# make cp fail
|
||||
SDIR=`$DIRNAME $tstfile`
|
||||
INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
|
||||
INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'`
|
||||
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
|
||||
$CP -f $tstfile $TESTDIR
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: FAILED to copy $tstfile ."
|
||||
|
||||
# Comment out this to CREATE expected file
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
@ -26,6 +26,9 @@ CMP='cmp -s'
|
||||
DIFF='diff -c'
|
||||
CP='cp'
|
||||
NLINES=20 # Max. lines of output to display if test fails
|
||||
DIRNAME='dirname'
|
||||
LS='ls'
|
||||
AWK='awk'
|
||||
|
||||
WORDS_BIGENDIAN="@WORDS_BIGENDIAN@"
|
||||
|
||||
@ -167,12 +170,20 @@ COPY_TESTFILES_TO_TESTDIR()
|
||||
echo $tstfile | tr -d ' ' | grep '^#' > /dev/null
|
||||
RET=$?
|
||||
if [ $RET -eq 1 ]; then
|
||||
if [ -a $tstfile ]; then
|
||||
$CP -f $tstfile $TESTDIR
|
||||
else
|
||||
echo "Error: FAILED to copy $tstfile"
|
||||
echo " $tstfile doesn't exist!"
|
||||
exit $EXIT_FAILURE
|
||||
# skip cp if srcdir is same as destdir
|
||||
# this occurs when build/test performed in source dir and
|
||||
# make cp fail
|
||||
SDIR=`$DIRNAME $tstfile`
|
||||
INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
|
||||
INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'`
|
||||
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
|
||||
$CP -f $tstfile $TESTDIR
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: FAILED to copy $tstfile ."
|
||||
|
||||
# Comment out this to CREATE expected file
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
@ -42,6 +42,9 @@ H5DUMP_BIN=`pwd`/$H5DUMP # The path of the h5dump tool binary
|
||||
|
||||
GREP='grep'
|
||||
CP='cp'
|
||||
DIRNAME='dirname'
|
||||
LS='ls'
|
||||
AWK='awk'
|
||||
|
||||
H5DETECTSZIP=testh5repack_detect_szip
|
||||
H5DETECTSZIP_BIN=`pwd`/$H5DETECTSZIP
|
||||
@ -137,12 +140,20 @@ COPY_TESTFILES_TO_TESTDIR()
|
||||
echo $tstfile | tr -d ' ' | grep '^#' > /dev/null
|
||||
RET=$?
|
||||
if [ $RET -eq 1 ]; then
|
||||
if [ -a $tstfile ]; then
|
||||
$CP -f $tstfile $TESTDIR
|
||||
else
|
||||
echo "Error: FAILED to copy $tstfile"
|
||||
echo " $tstfile doesn't exist!"
|
||||
exit $EXIT_FAILURE
|
||||
# skip cp if srcdir is same as destdir
|
||||
# this occurs when build/test performed in source dir and
|
||||
# make cp fail
|
||||
SDIR=`$DIRNAME $tstfile`
|
||||
INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
|
||||
INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'`
|
||||
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
|
||||
$CP -f $tstfile $TESTDIR
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: FAILED to copy $tstfile ."
|
||||
|
||||
# Comment out this to CREATE expected file
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
@ -33,6 +33,9 @@ STAT_BIN=`pwd`/$STAT # The path of the tool binary
|
||||
CMP='cmp -s'
|
||||
DIFF='diff -c'
|
||||
CP='cp'
|
||||
DIRNAME='dirname'
|
||||
LS='ls'
|
||||
AWK='awk'
|
||||
|
||||
nerrors=0
|
||||
verbose=yes
|
||||
@ -106,12 +109,20 @@ COPY_TESTFILES_TO_TESTDIR()
|
||||
echo $tstfile | tr -d ' ' | grep '^#' > /dev/null
|
||||
RET=$?
|
||||
if [ $RET -eq 1 ]; then
|
||||
if [ -a $tstfile ]; then
|
||||
$CP -f $tstfile $TESTDIR
|
||||
else
|
||||
echo "Error: FAILED to copy $tstfile"
|
||||
echo " $tstfile doesn't exist!"
|
||||
exit $EXIT_FAILURE
|
||||
# skip cp if srcdir is same as destdir
|
||||
# this occurs when build/test performed in source dir and
|
||||
# make cp fail
|
||||
SDIR=`$DIRNAME $tstfile`
|
||||
INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
|
||||
INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'`
|
||||
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
|
||||
$CP -f $tstfile $TESTDIR
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: FAILED to copy $tstfile ."
|
||||
|
||||
# Comment out this to CREATE expected file
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
Loading…
x
Reference in New Issue
Block a user