summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2015-10-08 20:50:15 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2015-10-08 20:50:15 (GMT)
commit1f1081e039bea766161cb7055589b74267764c9b (patch)
tree4322b8502e18562d6c88535ee83c8f0e1720138e /test
parent74ab402e3eb08b53dbf2ad7d3a27b51cfae87f5b (diff)
downloadhdf5-1f1081e039bea766161cb7055589b74267764c9b.zip
hdf5-1f1081e039bea766161cb7055589b74267764c9b.tar.gz
hdf5-1f1081e039bea766161cb7055589b74267764c9b.tar.bz2
[svn-r28009] HDFFV-9536: Changed H5check_version() to use libtool shared library version numbers instead of the library version numbers.
bin/h5vers: Changed to copy the shared lib version from lt_vers.am to H5public.h (Thanks to Larry who made the changes.) src/H5public.h: Changed by bin/h5vers. src/H5.c: Changed H5check_version() to use shared library version for compatibility checking. test/tcheck_version.c: test/testcheck_version.sh.in: Changed to use shared library version numbers instead of the HDF5 library version numbers for testing. Tested: tested in Jam and Kituo.
Diffstat (limited to 'test')
-rw-r--r--test/tcheck_version.c12
-rw-r--r--test/testcheck_version.sh.in11
2 files changed, 12 insertions, 11 deletions
diff --git a/test/tcheck_version.c b/test/tcheck_version.c
index a75d642..67c45fd 100644
--- a/test/tcheck_version.c
+++ b/test/tcheck_version.c
@@ -39,9 +39,9 @@ void parse(int ac, char **av);
void abort_intercept (int H5_ATTR_UNUSED sig);
/* global variables */
-unsigned major = H5_VERS_MAJOR;
-unsigned minor = H5_VERS_MINOR;
-unsigned release = H5_VERS_RELEASE;
+unsigned major = LT_VERS_INTERFACE;
+unsigned minor = LT_VERS_REVISION;
+unsigned release = LT_VERS_AGE;
void
showhelp(void)
@@ -50,9 +50,9 @@ showhelp(void)
printf("\t-h\tShow this page and version information\n");
printf("\t-t<vers>: Test by changing (adding 1 to) the <vers> to trigger\n");
printf("\t\t the warning. <vers> can be:\n");
- printf("\t\t\tM for Major version number (%d)\n", H5_VERS_MAJOR);
- printf("\t\t\tm for Minor version number (%d)\n", H5_VERS_MINOR);
- printf("\t\t\tr for Release number (%d)\n", H5_VERS_RELEASE);
+ printf("\t\t\tM for Major version number (%d)\n", LT_VERS_INTERFACE);
+ printf("\t\t\tm for Minor version number (%d)\n", LT_VERS_REVISION);
+ printf("\t\t\tr for Release number (%d)\n", LT_VERS_AGE);
}
diff --git a/test/testcheck_version.sh.in b/test/testcheck_version.sh.in
index ed9845e..f89480e 100644
--- a/test/testcheck_version.sh.in
+++ b/test/testcheck_version.sh.in
@@ -217,10 +217,11 @@ h5libsettings=../src/libhdf5.settings
PURPOSE
-# Figure out library version numbers from the header file.
-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`
+# Figure out lt version numbers from the header file.
+# sed uses spaces and tabs as white spaces.
+h5versmajor=`sed -e 's/#define[ ]*LT_VERS_INTERFACE[ ]*//p;d' $srcdir/../src/H5public.h`
+h5versminor=`sed -e 's/#define[ ]*LT_VERS_REVISION[ ]*//p;d' $srcdir/../src/H5public.h`
+h5versrelease=`sed -e 's/#define[ ]*LT_VERS_AGE[ ]*//p;d' $srcdir/../src/H5public.h`
DEBUGPRINT $h5versmajor.$h5versminor.$h5versrelease
case "$h5versmajor$h5versminor$h5versrelease" in
[0-9]*) # good. noop.
@@ -247,7 +248,7 @@ fi
# HDF5_DISABLE_VERSION_CHECK, as unset, "", -1, 0, 1, 2, 3
for val_disable_version_check in unset "" -1 0 1 2 3; do
- for wrong_version in none M m r; do
+ for wrong_version in none M r ; do
TESTING "$val_disable_version_check" "$wrong_version"
done
done