summaryrefslogtreecommitdiffstats
path: root/test/testcheck_version.sh.in
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-11-16 20:45:05 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-11-16 20:45:05 (GMT)
commitd2b87ec47ebdb096c331c7b62a195b9cea2f33ae (patch)
treea066f01361afaf5df457cef612bb0bb9fd80fe18 /test/testcheck_version.sh.in
parentee5a1e07350f0dcf3ef07d9443aa2f4c073392f4 (diff)
downloadhdf5-d2b87ec47ebdb096c331c7b62a195b9cea2f33ae.zip
hdf5-d2b87ec47ebdb096c331c7b62a195b9cea2f33ae.tar.gz
hdf5-d2b87ec47ebdb096c331c7b62a195b9cea2f33ae.tar.bz2
[svn-r17896] Description:
Bring r17546:17895 from trunk to revise_chunks branch. Changes to fixed and extensible array dataset chunk indexing code to accommodate changes to private APIs in those interfaces. Also, other adjustments to source code and expected output in response to changes on the trunk. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.6.2 (amazon) in debug mode Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'test/testcheck_version.sh.in')
-rw-r--r--test/testcheck_version.sh.in35
1 files changed, 23 insertions, 12 deletions
diff --git a/test/testcheck_version.sh.in b/test/testcheck_version.sh.in
index 593a466..6e80654 100644
--- a/test/testcheck_version.sh.in
+++ b/test/testcheck_version.sh.in
@@ -27,6 +27,7 @@ Static_exec=@STATIC_EXEC@
CMP='cmp -s'
DIFF='diff -c'
+RM='rm -f'
# Function definitions
#
@@ -116,9 +117,9 @@ TESTING() {
TEST_NAME=tcheck_version # The test name
TEST_BIN=`pwd`/$TEST_NAME # The path of the test binary
- expect=expected_out
- actual=actual_out
- actual_err=actual_err_out
+ expect=${TEST_NAME}_expect.out
+ actual=${TEST_NAME}_actual.out
+ actual_err=${TEST_NAME}_actual.err
arguments=
h5DisableVersion="$1"
@@ -136,7 +137,7 @@ TESTING() {
if [ "$wrongversionnumbers" = none ]; then
# OK: No warning, exit 0
cp /dev/null $expect
- expected_code=0
+ expect_code=0
else
arguments=-t"$wrongversionnumbers"
# calculate mismatched version numbers by listing.
@@ -152,16 +153,16 @@ TESTING() {
1)
# W2/OK: Different Warning, exit 0.
WarnMesg2 > $expect
- expected_code=0
+ expect_code=0
;;
[2-9]|[1-9][0-9]*)
# OK: No warning, exit 0
cp /dev/null $expect
- expected_code=0
+ expect_code=0
;;
*) # W/A: Warning, abort and exit non-0.
WarnMesg > $expect
- expected_code=134 # Signal Abort exit code (128+6)
+ expect_code=6 # Signal Abort exit code (128+6)
;;
esac
fi
@@ -174,9 +175,9 @@ TESTING() {
ret_code=$?
cat $actual_err >> $actual
- if [ \( $expected_code -ne $ret_code \) ]; then
+ if [ \( $expect_code -ne $ret_code \) ]; then
echo "*FAILED*"
- echo " Expected exit code ($expected_code) differs from actual code ($ret_code)"
+ echo " Expected exit code ($expect_code) differs from actual code ($ret_code)"
nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
echo " PASSED"
@@ -187,9 +188,11 @@ TESTING() {
test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
- # Clean up output file
+ # Clean up output file.
+ # Also clean the core file generated by H5check_version's abort.
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $expected_out $actual_out $actual_err
+ $RM $expect $actual $actual_err
+ $RM core
fi
}
@@ -221,7 +224,15 @@ h5versmajor=`grep '#define H5_VERS_MAJOR' $srcdir/../src/H5public.h | cut -f2`
h5versminor=`grep '#define H5_VERS_MINOR' $srcdir/../src/H5public.h | cut -f2`
h5versrelease=`grep '#define H5_VERS_RELEASE' $srcdir/../src/H5public.h | cut -f2`
DEBUGPRINT $h5versmajor.$h5versminor.$h5versrelease
-
+case "$h5versmajor$h5versminor$h5versrelease" in
+ [0-9]*) # good. noop.
+ ;;
+ *)
+ echo "Illegal library version numbers($h5versmajor.$h5versminor.$h5versrelease)"
+ echo "Test aborted"
+ exit 1
+ ;;
+esac
# Three Categories of tests:
# Normal: where the version numbers all matched (wrong_version == none).