summaryrefslogtreecommitdiffstats
path: root/tools/h5copy
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2010-06-08 18:23:48 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2010-06-08 18:23:48 (GMT)
commite8886d2d6a6e7c58fb801d05031ada9ed9cb537a (patch)
treef9ff6016e3fc9ce560dbf724fb176e46b1c1bd09 /tools/h5copy
parentf827580d235fa984b43c8ff695e041f1f86e0775 (diff)
downloadhdf5-e8886d2d6a6e7c58fb801d05031ada9ed9cb537a.zip
hdf5-e8886d2d6a6e7c58fb801d05031ada9ed9cb537a.tar.gz
hdf5-e8886d2d6a6e7c58fb801d05031ada9ed9cb537a.tar.bz2
[svn-r18986] Test feature: (bugs 1919)
Problem: some launching command like yod (and sometimes mpirun), do not pass back the exit code of the executables back to the shell. It always returns 0 if it can launch the executable. This cause tests that expect non-zero exit code to fail incorrectly. Short term Solution: Added the feature that if $RUNSERIAL_NOEXITCODE is defined, do not test conditions that rely on non-zero exit code. Tests: dove-linux using RUNSERIAL=thgyod to see the failures and using $RUNSERIAL_NOEXITCODE=yes to bypass the errors. Also h5committested.
Diffstat (limited to 'tools/h5copy')
-rw-r--r--tools/h5copy/testh5copy.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/h5copy/testh5copy.sh b/tools/h5copy/testh5copy.sh
index 3f24bdf..e98e67e 100644
--- a/tools/h5copy/testh5copy.sh
+++ b/tools/h5copy/testh5copy.sh
@@ -41,6 +41,7 @@ DIFF='diff -c'
nerrors=0
verbose=yes
+h5haveexitcode=yes # default is yes
# The build (current) directory might be different than the source directory.
if test -z "$srcdir"; then
@@ -51,6 +52,13 @@ OUTDIR=./testfiles
test -d $OUTDIR || mkdir $OUTDIR
+# RUNSERIAL is used. Check if it can return exit code from executalbe correctly.
+if [ -n "$RUNSERIAL_NOEXITCODE" ]; then
+ echo "***Warning*** Serial Exit Code is not passed back to shell corretly."
+ echo "***Warning*** Exit code checking is skipped."
+ h5haveexitcode=no
+fi
+
# Print a "SKIP" message
SKIP() {
TESTING $H5COPY $@
@@ -200,7 +208,7 @@ H5DIFFTEST_FAIL()
$RUNSERIAL $H5DIFF_BIN -q "$@"
RET=$?
- if [ $RET != 1 ] ; then
+ if [ $h5haveexitcode = 'yes' -a $RET != 1 ] ; then
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
else