summaryrefslogtreecommitdiffstats
path: root/examples/testh5cc.sh.in
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2007-04-13 15:38:39 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2007-04-13 15:38:39 (GMT)
commiteb7f1426ba3e0942f068dc9e02b8a2939c942776 (patch)
treea7b378a90c0ee6d7f0414688ec5194d3b7a41e97 /examples/testh5cc.sh.in
parent4041bb84481b5c8e199bc142f337e95e023cc20d (diff)
downloadhdf5-eb7f1426ba3e0942f068dc9e02b8a2939c942776.zip
hdf5-eb7f1426ba3e0942f068dc9e02b8a2939c942776.tar.gz
hdf5-eb7f1426ba3e0942f068dc9e02b8a2939c942776.tar.bz2
[svn-r13653] Purpose:
features. Description: Added -shlib tests and verbosity control. Tested Platform: Kagiso.
Diffstat (limited to 'examples/testh5cc.sh.in')
-rwxr-xr-xexamples/testh5cc.sh.in36
1 files changed, 30 insertions, 6 deletions
diff --git a/examples/testh5cc.sh.in b/examples/testh5cc.sh.in
index 68358a3..0e705f7 100755
--- a/examples/testh5cc.sh.in
+++ b/examples/testh5cc.sh.in
@@ -17,6 +17,8 @@
# Created: Albert Cheng, 2007/3/13
#
# Modification:
+# Albert Cheng, 2007/4/13
+# Added -shlib tests and verbose control.
#
# Initializations
@@ -36,7 +38,8 @@ CMP='cmp -s'
DIFF='diff -c'
nerrors=0
-verbose=yes
+verbose=${HDF5_VERBOSE:-1} # 0: none; 1: default; 2: chatty; 3: everything
+test $verbose -gt 2 && set -x
# setup my machine information.
myos=`uname -s`
@@ -166,10 +169,13 @@ TOOLTEST() {
result=$?
if [ $result = 0 ]; then
echo " PASSED"
+ test $verbose -gt 1 && \
+ ( echo "========== results ==========="; cat $out;
+ echo "===============================================") |sed 's/^/ /'
else
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && \
+ test $verbose -gt 0 && \
( echo "========== results ==========="; cat $out;
echo "===============================================") |sed 's/^/ /'
fi
@@ -191,28 +197,46 @@ SKIP() {
### T H E T E S T S ###
##############################################################################
#
-# HDF5 program that calls HDF5 APIs.
+# Group 1: HDF5 program that calls HDF5 APIs.
echo "***"Simple Compile and Link in one step.
TOOLTEST $hdf5main
# Application program that calls HDF5 and its own functions.
TOOLTEST $appmain $prog1 $prog2
+# Repeat with -shlib option
+echo "***"Simple Compile and Link with -shlib in one step.
+TOOLTEST -shlib $hdf5main
+# Application program that calls HDF5 and its own functions.
+TOOLTEST -shlib $appmain $prog1 $prog2
-# Compile, then link.
+# Group 2: Compile, then link.
echo "***"Compile and Link in two steps.
TOOLTEST -c $hdf5main
TOOLTEST $hdf5main_o
TOOLTEST -c $appmain $prog1 $prog2
TOOLTEST $appmain_o $prog1_o $prog2_o
+# Repeat with -shlib option
+echo "***"Compile and Link with -shlib in two steps.
+TOOLTEST -c $hdf5main
+TOOLTEST -shlib $hdf5main_o
+TOOLTEST -c $appmain $prog1 $prog2
+TOOLTEST -shlib $appmain_o $prog1_o $prog2_o
-# Build external library, then link with it.
+# Group3: Build external library, then link with it.
echo "***"Build external library and link with it.
TOOLTEST -c $prog1 $prog2
$AR cru $applib $prog1_o $prog2_o
$RANLIB $applib
TOOLTEST $appmain $applib
TOOLTEST $appmain_o $applib
+# Repeat with -shlib option
+echo "***"Build external library and link with it using -shlib.
+TOOLTEST -c $prog1 $prog2
+$AR cru $applib $prog1_o $prog2_o
+$RANLIB $applib
+TOOLTEST -shlib $appmain $applib
+TOOLTEST -shlib $appmain_o $applib
-# Just preprocess, no compile, no link.
+# Group 4: Just preprocess, no compile, no link.
echo "***"Just preprocess, no compile, no link.
TOOLTEST -E $hdf5main
TOOLTEST -E $appmain $prog1 $prog2