mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-31 17:10:47 +08:00
Same changes needed for examples as test
This commit is contained in:
parent
22eda96a9c
commit
958c7bd833
@ -52,12 +52,14 @@ test -d $BLDLIBDIR || mkdir -p $BLDLIBDIR
|
||||
# Comment '#' without space can be used.
|
||||
# --------------------------------------------------------------------
|
||||
LIST_LIBRARY_FILES="
|
||||
$HDFLIB_HOME/slf4j-api-1.7.25.jar
|
||||
$HDFLIB_HOME/ext/slf4j-simple-1.7.25.jar
|
||||
$top_builddir/src/.libs/libhdf5.*
|
||||
$top_builddir/java/src/jni/.libs/libhdf5_java.*
|
||||
$top_builddir/java/src/$JARFILE
|
||||
"
|
||||
LIST_JAR_TESTFILES="
|
||||
$HDFLIB_HOME/slf4j-api-1.7.25.jar
|
||||
$HDFLIB_HOME/ext/slf4j-simple-1.7.25.jar
|
||||
"
|
||||
LIST_DATA_FILES="
|
||||
$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_Alloc.txt
|
||||
$HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_Checksum.txt
|
||||
@ -83,6 +85,7 @@ $HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_Soint.txt
|
||||
# copy files from source dirs to test dir
|
||||
#
|
||||
COPY_LIBFILES="$LIST_LIBRARY_FILES"
|
||||
COPY_JARTESTFILES="$LIST_JAR_TESTFILES"
|
||||
|
||||
COPY_LIBFILES_TO_BLDLIBDIR()
|
||||
{
|
||||
@ -104,6 +107,30 @@ COPY_LIBFILES_TO_BLDLIBDIR()
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: FAILED to copy $tstfile ."
|
||||
|
||||
# Comment out this to CREATE expected file
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
# copy jar files. Used -f to make sure get a new copy
|
||||
for tstfile in $COPY_JARTESTFILES
|
||||
do
|
||||
# ignore '#' comment
|
||||
echo $tstfile | tr -d ' ' | grep '^#' > /dev/null
|
||||
RET=$?
|
||||
if [ $RET -eq 1 ]; then
|
||||
# skip cp if srcdir is same as destdir
|
||||
# this occurs when build/test performed in source dir and
|
||||
# make cp fail
|
||||
SDIR=`$DIRNAME $tstfile`
|
||||
INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
|
||||
INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'`
|
||||
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
|
||||
$CP -f $tstfile $BLDLIBDIR
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: FAILED to copy $tstfile ."
|
||||
|
||||
# Comment out this to CREATE expected file
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
@ -117,11 +144,14 @@ CLEAN_LIBFILES_AND_BLDLIBDIR()
|
||||
# skip rm if srcdir is same as destdir
|
||||
# this occurs when build/test performed in source dir and
|
||||
# make cp fail
|
||||
SDIR=`$DIRNAME $HDFLIB_HOME/slf4j-api-1.7.25.jar`
|
||||
SDIR=$HDFLIB_HOME
|
||||
INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
|
||||
INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'`
|
||||
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
|
||||
$RM $BLDLIBDIR
|
||||
for tstfile in $COPY_JARTESTFILES
|
||||
do
|
||||
$RM $BLDLIBDIR/tstfile
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
@ -215,14 +245,9 @@ if $TEST -z "$LD_LIBRARY_PATH" ; then
|
||||
fi
|
||||
|
||||
case $os_name in
|
||||
Darwin)
|
||||
DYLD_LIBRARY_PATH=$BLDLIBDIR:$DYLD_LIBRARY_PATH
|
||||
export DYLD_LIBRARY_PATH
|
||||
LD_LIBRARY_PATH=$DYLD_LIBRARY_PATH
|
||||
;;
|
||||
*)
|
||||
LD_LIBRARY_PATH=$BLDLIBDIR:$LD_LIBRARY_PATH
|
||||
;;
|
||||
;;
|
||||
esac
|
||||
|
||||
export LD_LIBRARY_PATH
|
||||
|
@ -49,12 +49,14 @@ test -d $BLDLIBDIR || mkdir -p $BLDLIBDIR
|
||||
# Comment '#' without space can be used.
|
||||
# --------------------------------------------------------------------
|
||||
LIST_LIBRARY_FILES="
|
||||
$HDFLIB_HOME/slf4j-api-1.7.25.jar
|
||||
$HDFLIB_HOME/ext/slf4j-simple-1.7.25.jar
|
||||
$top_builddir/src/.libs/libhdf5.*
|
||||
$top_builddir/java/src/jni/.libs/libhdf5_java.*
|
||||
$top_builddir/java/src/$JARFILE
|
||||
"
|
||||
LIST_JAR_TESTFILES="
|
||||
$HDFLIB_HOME/slf4j-api-1.7.25.jar
|
||||
$HDFLIB_HOME/ext/slf4j-simple-1.7.25.jar
|
||||
"
|
||||
LIST_DATA_FILES="
|
||||
$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_Array.txt
|
||||
$HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_ArrayAttribute.txt
|
||||
@ -80,6 +82,7 @@ $HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_VLString.txt
|
||||
# copy files from source dirs to test dir
|
||||
#
|
||||
COPY_LIBFILES="$LIST_LIBRARY_FILES"
|
||||
COPY_JARTESTFILES="$LIST_JAR_TESTFILES"
|
||||
|
||||
COPY_LIBFILES_TO_BLDLIBDIR()
|
||||
{
|
||||
@ -101,6 +104,30 @@ COPY_LIBFILES_TO_BLDLIBDIR()
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: FAILED to copy $tstfile ."
|
||||
|
||||
# Comment out this to CREATE expected file
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
# copy jar files. Used -f to make sure get a new copy
|
||||
for tstfile in $COPY_JARTESTFILES
|
||||
do
|
||||
# ignore '#' comment
|
||||
echo $tstfile | tr -d ' ' | grep '^#' > /dev/null
|
||||
RET=$?
|
||||
if [ $RET -eq 1 ]; then
|
||||
# skip cp if srcdir is same as destdir
|
||||
# this occurs when build/test performed in source dir and
|
||||
# make cp fail
|
||||
SDIR=`$DIRNAME $tstfile`
|
||||
INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
|
||||
INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'`
|
||||
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
|
||||
$CP -f $tstfile $BLDLIBDIR
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: FAILED to copy $tstfile ."
|
||||
|
||||
# Comment out this to CREATE expected file
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
@ -114,11 +141,14 @@ CLEAN_LIBFILES_AND_BLDLIBDIR()
|
||||
# skip rm if srcdir is same as destdir
|
||||
# this occurs when build/test performed in source dir and
|
||||
# make cp fail
|
||||
SDIR=`$DIRNAME $HDFLIB_HOME/slf4j-api-1.7.25.jar`
|
||||
SDIR=$HDFLIB_HOME
|
||||
INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
|
||||
INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'`
|
||||
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
|
||||
$RM $BLDLIBDIR
|
||||
for tstfile in $COPY_JARTESTFILES
|
||||
do
|
||||
$RM $BLDLIBDIR/tstfile
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
@ -211,11 +241,6 @@ if $TEST -z "$LD_LIBRARY_PATH" ; then
|
||||
fi
|
||||
|
||||
case $os_name in
|
||||
Darwin)
|
||||
DYLD_LIBRARY_PATH=$BLDLIBDIR:$DYLD_LIBRARY_PATH
|
||||
export DYLD_LIBRARY_PATH
|
||||
LD_LIBRARY_PATH=$DYLD_LIBRARY_PATH
|
||||
;;
|
||||
*)
|
||||
LD_LIBRARY_PATH=$BLDLIBDIR:$LD_LIBRARY_PATH
|
||||
;;
|
||||
|
@ -51,15 +51,13 @@ test -d $BLDREFDIR || mkdir -p $BLDREFDIR
|
||||
# Comment '#' without space can be used.
|
||||
# --------------------------------------------------------------------
|
||||
LIST_LIBRARY_FILES="
|
||||
$HDFLIB_HOME/slf4j-api-1.7.25.jar
|
||||
$HDFLIB_HOME/ext/slf4j-simple-1.7.25.jar
|
||||
$top_builddir/src/.libs/libhdf5.*
|
||||
$top_builddir/java/src/jni/.libs/libhdf5_java.*
|
||||
$top_builddir/java/src/$JARFILE
|
||||
"
|
||||
LIST_REF_FILES="
|
||||
$HDFTEST_HOME/h5ex_g_iterate.h5
|
||||
$HDFTEST_HOME/h5ex_g_visit.h5
|
||||
LIST_JAR_TESTFILES="
|
||||
$HDFLIB_HOME/slf4j-api-1.7.25.jar
|
||||
$HDFLIB_HOME/ext/slf4j-simple-1.7.25.jar
|
||||
"
|
||||
LIST_DATA_FILES="
|
||||
$HDFTEST_HOME/../testfiles/examples.groups.H5Ex_G_Create.txt
|
||||
@ -75,6 +73,7 @@ $HDFTEST_HOME/../testfiles/examples.groups.H5Ex_G_Visit.txt
|
||||
# copy files from source dirs to test dir
|
||||
#
|
||||
COPY_LIBFILES="$LIST_LIBRARY_FILES"
|
||||
COPY_JARTESTFILES="$LIST_JAR_TESTFILES"
|
||||
|
||||
COPY_LIBFILES_TO_BLDLIBDIR()
|
||||
{
|
||||
@ -96,6 +95,30 @@ COPY_LIBFILES_TO_BLDLIBDIR()
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: FAILED to copy $tstfile ."
|
||||
|
||||
# Comment out this to CREATE expected file
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
# copy jar files. Used -f to make sure get a new copy
|
||||
for tstfile in $COPY_JARTESTFILES
|
||||
do
|
||||
# ignore '#' comment
|
||||
echo $tstfile | tr -d ' ' | grep '^#' > /dev/null
|
||||
RET=$?
|
||||
if [ $RET -eq 1 ]; then
|
||||
# skip cp if srcdir is same as destdir
|
||||
# this occurs when build/test performed in source dir and
|
||||
# make cp fail
|
||||
SDIR=`$DIRNAME $tstfile`
|
||||
INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
|
||||
INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'`
|
||||
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
|
||||
$CP -f $tstfile $BLDLIBDIR
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: FAILED to copy $tstfile ."
|
||||
|
||||
# Comment out this to CREATE expected file
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
@ -109,11 +132,14 @@ CLEAN_LIBFILES_AND_BLDLIBDIR()
|
||||
# skip rm if srcdir is same as destdir
|
||||
# this occurs when build/test performed in source dir and
|
||||
# make cp fail
|
||||
SDIR=`$DIRNAME $HDFLIB_HOME/slf4j-api-1.7.25.jar`
|
||||
SDIR=$HDFLIB_HOME
|
||||
INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
|
||||
INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'`
|
||||
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
|
||||
$RM $BLDLIBDIR
|
||||
for tstfile in $COPY_JARTESTFILES
|
||||
do
|
||||
$RM $BLDLIBDIR/tstfile
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
@ -257,11 +283,6 @@ if $TEST -z "$LD_LIBRARY_PATH" ; then
|
||||
fi
|
||||
|
||||
case $os_name in
|
||||
Darwin)
|
||||
DYLD_LIBRARY_PATH=$BLDLIBDIR:$DYLD_LIBRARY_PATH
|
||||
export DYLD_LIBRARY_PATH
|
||||
LD_LIBRARY_PATH=$DYLD_LIBRARY_PATH
|
||||
;;
|
||||
*)
|
||||
LD_LIBRARY_PATH=$BLDLIBDIR:$LD_LIBRARY_PATH
|
||||
;;
|
||||
|
@ -49,12 +49,14 @@ test -d $BLDLIBDIR || mkdir -p $BLDLIBDIR
|
||||
# Comment '#' without space can be used.
|
||||
# --------------------------------------------------------------------
|
||||
LIST_LIBRARY_FILES="
|
||||
$HDFLIB_HOME/slf4j-api-1.7.25.jar
|
||||
$HDFLIB_HOME/ext/slf4j-simple-1.7.25.jar
|
||||
$top_builddir/src/.libs/libhdf5.*
|
||||
$top_builddir/java/src/jni/.libs/libhdf5_java.*
|
||||
$top_builddir/java/src/$JARFILE
|
||||
"
|
||||
LIST_JAR_TESTFILES="
|
||||
$HDFLIB_HOME/slf4j-api-1.7.25.jar
|
||||
$HDFLIB_HOME/ext/slf4j-simple-1.7.25.jar
|
||||
"
|
||||
LIST_DATA_FILES="
|
||||
$HDFTEST_HOME/../testfiles/examples.intro.H5_CreateDataset.txt
|
||||
$HDFTEST_HOME/../testfiles/examples.intro.H5_CreateAttribute.txt
|
||||
@ -69,6 +71,7 @@ $HDFTEST_HOME/../testfiles/examples.intro.H5_ReadWrite.txt
|
||||
# copy files from source dirs to test dir
|
||||
#
|
||||
COPY_LIBFILES="$LIST_LIBRARY_FILES"
|
||||
COPY_JARTESTFILES="$LIST_JAR_TESTFILES"
|
||||
|
||||
COPY_LIBFILES_TO_BLDLIBDIR()
|
||||
{
|
||||
@ -90,6 +93,30 @@ COPY_LIBFILES_TO_BLDLIBDIR()
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: FAILED to copy $tstfile ."
|
||||
|
||||
# Comment out this to CREATE expected file
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
# copy jar files. Used -f to make sure get a new copy
|
||||
for tstfile in $COPY_JARTESTFILES
|
||||
do
|
||||
# ignore '#' comment
|
||||
echo $tstfile | tr -d ' ' | grep '^#' > /dev/null
|
||||
RET=$?
|
||||
if [ $RET -eq 1 ]; then
|
||||
# skip cp if srcdir is same as destdir
|
||||
# this occurs when build/test performed in source dir and
|
||||
# make cp fail
|
||||
SDIR=`$DIRNAME $tstfile`
|
||||
INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
|
||||
INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'`
|
||||
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
|
||||
$CP -f $tstfile $BLDLIBDIR
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: FAILED to copy $tstfile ."
|
||||
|
||||
# Comment out this to CREATE expected file
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
@ -103,11 +130,14 @@ CLEAN_LIBFILES_AND_BLDLIBDIR()
|
||||
# skip rm if srcdir is same as destdir
|
||||
# this occurs when build/test performed in source dir and
|
||||
# make cp fail
|
||||
SDIR=`$DIRNAME $HDFLIB_HOME/slf4j-api-1.7.25.jar`
|
||||
SDIR=$HDFLIB_HOME
|
||||
INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
|
||||
INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'`
|
||||
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
|
||||
$RM $BLDLIBDIR
|
||||
for tstfile in $COPY_JARTESTFILES
|
||||
do
|
||||
$RM $BLDLIBDIR/tstfile
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
@ -200,11 +230,6 @@ if $TEST -z "$LD_LIBRARY_PATH" ; then
|
||||
fi
|
||||
|
||||
case $os_name in
|
||||
Darwin)
|
||||
DYLD_LIBRARY_PATH=$BLDLIBDIR:$DYLD_LIBRARY_PATH
|
||||
export DYLD_LIBRARY_PATH
|
||||
LD_LIBRARY_PATH=$DYLD_LIBRARY_PATH
|
||||
;;
|
||||
*)
|
||||
LD_LIBRARY_PATH=$BLDLIBDIR:$LD_LIBRARY_PATH
|
||||
;;
|
||||
|
Loading…
x
Reference in New Issue
Block a user