summaryrefslogtreecommitdiffstats
path: root/tools/h5diff
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2012-07-22 20:52:34 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2012-07-22 20:52:34 (GMT)
commit85d0f3befd5e2345ae5b7c07af5d944bcd91f656 (patch)
tree87dec8b342eea623e2c7345fa67089c0ccfbd47f /tools/h5diff
parentdfebc04ff6e4a337e06b7928cd2c414c61280692 (diff)
downloadhdf5-85d0f3befd5e2345ae5b7c07af5d944bcd91f656.zip
hdf5-85d0f3befd5e2345ae5b7c07af5d944bcd91f656.tar.gz
hdf5-85d0f3befd5e2345ae5b7c07af5d944bcd91f656.tar.bz2
[svn-r22595] Bug fix: HDFFV-8105
Description: The test command in COPY_TESTFILES_TO_TESTDIR used the wrong operator -a which means and. It is not sufficient to test mere existence as $tstfile could have been a directory or other non-file things. If the file is not readable, the $CP command would fail but its return code was not checked. Solution: Get rid of the test command and go ahead to $CP it and then check its returned code and report errors if detected. Tested; committested.
Diffstat (limited to 'tools/h5diff')
-rwxr-xr-xtools/h5diff/testh5diff.sh6
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/h5diff/testh5diff.sh b/tools/h5diff/testh5diff.sh
index cb91a19..a208acf 100755
--- a/tools/h5diff/testh5diff.sh
+++ b/tools/h5diff/testh5diff.sh
@@ -318,11 +318,9 @@ 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
+ $CP -f $tstfile $TESTDIR
+ if [ $? -ne 0 ]; then
echo "Error: FAILED to copy $tstfile ."
- echo " $tstfile doesn't exist!"
# Comment out this to CREATE expected file
exit $EXIT_FAILURE