mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-12-09 07:32:32 +08:00
f859cb732b
* fixed missed closing of a dataset * fixed missed closing of a dataset * fixed typo in error return * Committing clang-format changes * minor edits * code format * Committing clang-format changes * code format * minor edit * switched from using MPI_count, to actual bytes written for H5FD_mpio_debug rw debugging * Committing clang-format changes * changed size_i in printf to reflect the I/O. * Committing clang-format changes * Fixed seg fault with xlf on BE with -qintsize=8 * fixed error function string * spelling corrections via codespell, added new spell check github actions * Committing clang-format changes * misc * misc * misc * misc * misc * misc * misc * misc * misc * misc * misc * misc * misc * misc * Committing clang-format changes * misc * misc * misc * misc * misc * misc * Committing clang-format changes * misc * work around for https://github.com/codespell-project/codespell/issues/2137 * misc * added missing file * misc * misc. * misc * switch to using Codespell with GitHub Actions * misc. * misc. * fixed more sp errors * Fix new typos found by codespell. * fixed proceed with precede * fixed variable in fortran test * fixed minnum * updated spelling list Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
121 lines
3.1 KiB
Bash
121 lines
3.1 KiB
Bash
#! /bin/sh
|
|
#
|
|
# Copyright by The HDF Group.
|
|
# Copyright by the Board of Trustees of the University of Illinois.
|
|
# All rights reserved.
|
|
#
|
|
# This file is part of HDF5. The full HDF5 copyright notice, including
|
|
# terms governing use, modification, and redistribution, is contained in
|
|
# the COPYING file, which can be found at the root of the source code
|
|
# distribution tree, or in https://www.hdfgroup.org/licenses.
|
|
# If you do not have access to either file, you may request a copy from
|
|
# help@hdfgroup.org.
|
|
|
|
|
|
#
|
|
# Tests for the embedded library information feature.
|
|
# Part 1:
|
|
# Verify the HDF5 library does contains an exact copy of the content of the
|
|
# libhdf5.settings file.
|
|
# Part 2:
|
|
# If executable is linked with the static hdf5 library (how to determine?),
|
|
# verify an executable indeed contains an exact copy of the content of the
|
|
# libhdf5.settings file.
|
|
#
|
|
# Programmer: Albert Cheng
|
|
# Sep 18, 2009
|
|
|
|
srcdir=@srcdir@
|
|
|
|
# Determine the configure options of the hdf5 library and executables.
|
|
|
|
Shared_Lib=@enable_shared@
|
|
Static_Lib=@enable_static@
|
|
Static_exec=@STATIC_EXEC@
|
|
|
|
|
|
# Print a line-line message left justified in a field of 70 characters.
|
|
#
|
|
LINEMSG() {
|
|
SPACES=" "
|
|
echo "Check file $* $SPACES" | cut -c1-70 | tr -d '\012'
|
|
}
|
|
|
|
|
|
# Print a "SKIP" message
|
|
SKIP() {
|
|
LINEMSG $*
|
|
echo " -SKIP-"
|
|
}
|
|
|
|
# Function definitions
|
|
CHECK_LIBINFO(){
|
|
LINEMSG $1
|
|
# Some systems, like Mac, the strings command inspects library files. Older
|
|
# versions of strings may not know newer library format, resulting in
|
|
# command errors. Make it read the file as stdin to avoid the problem.
|
|
if strings < $1 | grep "SUMMARY OF THE HDF5 CONFIGURATION" > /dev/null; then
|
|
echo " PASSED"
|
|
else
|
|
echo " FAILED"
|
|
nerrors=`expr $nerrors + 1`
|
|
fi
|
|
}
|
|
|
|
|
|
# MAIN Body
|
|
nerrors=0
|
|
H5_HAVE_EMBEDDED_LIBINFO=`grep '#define H5_HAVE_EMBEDDED_LIBINFO ' ../src/H5pubconf.h`
|
|
|
|
# Skip the rest if embedded-libinfo is not enabled.
|
|
if [ -z "$H5_HAVE_EMBEDDED_LIBINFO" ]; then
|
|
echo "embedded-libinfo is not enabled. Test skipped."
|
|
exit 0
|
|
fi
|
|
|
|
# The location of HDF library file(s) depends on whether shared lib is
|
|
# built too.
|
|
if [ -n $Shared_Lib ]; then
|
|
h5libdir=../src/.libs
|
|
shlib=$(grep dlname ../src/libhdf5.la | sed -e "s/dlname='//" -e "s/'//")
|
|
else
|
|
h5libdir=../src
|
|
fi
|
|
|
|
h5libsettings=../src/libhdf5.settings
|
|
|
|
# Part 1:
|
|
# Verify the HDF5 library does contains an exact copy of the content of the
|
|
# libhdf5.settings file.
|
|
# Check dynamic library file if built.
|
|
if [ x-$Shared_Lib = x-yes ]; then
|
|
CHECK_LIBINFO ${h5libdir}/${shlib}
|
|
else
|
|
SKIP shlib
|
|
fi
|
|
|
|
# Though rare, libhdf5.a may not have been built.
|
|
if [ x-$Static_Lib = x-yes ]; then
|
|
CHECK_LIBINFO ${h5libdir}/libhdf5.a
|
|
else
|
|
SKIP ${h5libdir}/libhdf5.a
|
|
fi
|
|
|
|
# Check if executables has the lib information only if shared lib is not
|
|
# built or static-exec is used. (Don't care static-exec since it affects
|
|
# tools binary only.)
|
|
if [ x-$Shared_Lib != x-yes ]; then
|
|
CHECK_LIBINFO testhdf5
|
|
else
|
|
SKIP testhdf5
|
|
fi
|
|
|
|
|
|
if [ $nerrors -gt 0 ]; then
|
|
echo "***$nerrors errors encountered***"
|
|
exit 1
|
|
else
|
|
echo "No error encountered"
|
|
exit 0
|
|
fi
|