summaryrefslogtreecommitdiffstats
path: root/tools/h5diff/testh5diff.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/h5diff/testh5diff.sh')
-rwxr-xr-xtools/h5diff/testh5diff.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/h5diff/testh5diff.sh b/tools/h5diff/testh5diff.sh
index 5bbec8d..421bf73 100755
--- a/tools/h5diff/testh5diff.sh
+++ b/tools/h5diff/testh5diff.sh
@@ -67,6 +67,7 @@ DIFF='diff -c'
nerrors=0
verbose=yes
+h5haveexitcode=yes # default is yes
pmode= # default to run h5diff tests
mydomainname=`domainname 2>/dev/null`
@@ -103,6 +104,13 @@ while [ $# -gt 0 ]; do
esac
done
+# 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 line-line message left justified in a field of 70 characters
# beginning with the word "Testing".
#
@@ -224,7 +232,7 @@ TOOLTEST() {
# is from mpirun not tool)
# if any problem occurs relate to an exit code, it will be caught in
# serial mode, so the test is fullfilled.
- if test -z "$pmode"; then
+ if test $h5haveexitcode = 'yes' -a -z "$pmode"; then
echo "EXIT CODE: $EXIT_CODE" >> $actual
fi
@@ -234,7 +242,7 @@ TOOLTEST() {
cp $actual $expect
elif $CMP $expect $actual; then
echo " PASSED"
- elif test -z "$pmode"; then
+ elif test $h5haveexitcode = 'yes' -a -z "$pmode"; then
echo "*FAILED*"
echo " Expected result ($expect) differs from actual result ($actual)"
nerrors="`expr $nerrors + 1`"