summaryrefslogtreecommitdiffstats
path: root/tools/h5diff/testh5diff.sh
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2005-02-04 04:13:37 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2005-02-04 04:13:37 (GMT)
commitd9c9a573fb832bf209c8a6905a68f75830426136 (patch)
tree1a56860b27cea44e7e21966e54dbe1dc82ecf556 /tools/h5diff/testh5diff.sh
parentdb2575baa91049ad4d5e5ea623ff1161443d1af2 (diff)
downloadhdf5-d9c9a573fb832bf209c8a6905a68f75830426136.zip
hdf5-d9c9a573fb832bf209c8a6905a68f75830426136.tar.gz
hdf5-d9c9a573fb832bf209c8a6905a68f75830426136.tar.bz2
[svn-r9931] Purpose:
new features Description: Added a parallel option to testh5diff.sh to do parallel h5diff tests. Added testph5diff.sh to invoke testh5diff.sh with parallel mode. Platforms tested: Tested in heping (serial and pp).
Diffstat (limited to 'tools/h5diff/testh5diff.sh')
-rwxr-xr-xtools/h5diff/testh5diff.sh36
1 files changed, 34 insertions, 2 deletions
diff --git a/tools/h5diff/testh5diff.sh b/tools/h5diff/testh5diff.sh
index aea60a0..07f40b8 100755
--- a/tools/h5diff/testh5diff.sh
+++ b/tools/h5diff/testh5diff.sh
@@ -13,6 +13,10 @@
# access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu.
#
# Tests for the h5diff tool
+#
+# Modification:
+# Albert Cheng, 2005/2/3
+# Added -p option for parallel h5diff tests.
H5DIFF=h5diff # The tool name
H5DIFF_BIN=`pwd`/$H5DIFF # The path of the tool binary
@@ -22,6 +26,7 @@ DIFF='diff -c'
nerrors=0
verbose=yes
+pmode= # default to run h5diff tests
# The build (current) directory might be different than the source directory.
if test -z "$srcdir"; then
@@ -30,6 +35,30 @@ fi
test -d ../testfiles || mkdir ../testfiles
+# Parse option
+# -p run ph5diff tests
+# -h print help page
+while [ $# -gt 0 ]; do
+ case "$1" in
+ -p) # run ph5diff tests
+ H5DIFF=ph5diff
+ pmode=yes
+ shift
+ ;;
+ -h) # print help page
+ echo "$0 [-p] [-h]"
+ echo " -p run ph5diff tests"
+ echo " -h print help page"
+ shift
+ exit 0
+ ;;
+ *) # unknown option
+ echo "$0: Unknown option ($1)"
+ exit 1
+ ;;
+ esac
+done
+
# Print a line-line message left justified in a field of 70 characters
# beginning with the word "Testing".
#
@@ -47,8 +76,10 @@ TESTING() {
# non-zero value.
#
TOOLTEST() {
- if test -z "$RUNPARALLEL"; then
- echo $* SKIPPED
+ if test -n "$pmode"; then
+ shift
+ TESTING $H5DIFF $@
+ echo " -SKIP-"
else
expect="$srcdir/../testfiles/$1"
actual="../testfiles/`basename $1 .txt`.out"
@@ -92,6 +123,7 @@ TOOLTEST() {
fi
}
+
##############################################################################
##############################################################################
### T H E T E S T S ###