Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

escape dir name #42

Merged
merged 15 commits into from
Nov 27, 2023
4 changes: 2 additions & 2 deletions C/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ add_subdirectory (${PROJECT_SOURCE_DIR}/H5T)
if (${H5_LIBVER_DIR} GREATER 16)
# add_subdirectory (${PROJECT_SOURCE_DIR}/Perf)
if (USE_SHARED_LIBS AND HDF_BUILD_FILTERS AND HDF5_ENABLE_PLUGIN_SUPPORT)
add_subdirectory (${PROJECT_SOURCE_DIR}/H5F)
add_subdirectory (${PROJECT_SOURCE_DIR}/H5FLT)
endif ()
endif ()

if (H5_HAVE_PARALLEL AND HDF5_ENABLE_PARALLEL)
add_subdirectory (${PROJECT_SOURCE_DIR}/H5P)
add_subdirectory (${PROJECT_SOURCE_DIR}/H5PAR)
endif ()
43 changes: 30 additions & 13 deletions C/H5D/test.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ topics18=""

version_compare "$H5_LIBVER" "1.8.0"
# check if HDF5 version is < 1.8.0
if [ "$version_lt" = 0 ]; then
16dir="/16"
if [ "$version_lt" = 1 ]; then
dir16="\/16"
else
16dir=""
dir16=""
topics18="nbit sofloat soint transform"
fi

Expand All @@ -74,7 +74,7 @@ for topic in $topics
do
fname=h5ex_d_$topic
$ECHO_N "Testing C/H5D/$fname...$ECHO_C"
exout .$16dir/$fname >tmp.test
exout .$dir16/$fname >tmp.test
status=$?
if test $status -eq 1
then
Expand Down Expand Up @@ -104,18 +104,22 @@ done

#######Non-standard tests#######
USE_ALT=""
### Set default tfiles directory for tests
nbitdir="18"
version_compare "$H5_LIBVER" "1.8.23"
# check if HDF5 version is < 1.8.23
if [ "$version_lt" = 1 ]; then
USE_ALT="22"
nbitdir="18"
else
# check if HDF5 version is < 1.10.8
version_compare "$H5_LIBVER" "1.10.8"
if [ "$version_lt" = 1 ]; then
USE_ALT="07"
# check if HDF5 version is >= 1.10.0 and < 1.10.8
version_compare "$H5_LIBVER" "1.10.0"
if [ "$version_lt" = 0 ]; then
version_compare "$H5_LIBVER" "1.10.8"
if [ "$version_lt" = 1 ]; then
USE_ALT="07"
nbitdir="110"
fi
fi
nbitdir="110"
fi

for topic in $topics18
Expand All @@ -129,19 +133,32 @@ do
echo " Unsupported feature"
status=0
else
if "fname"=="h5ex_d_nbit"
if [[ $fname == "h5ex_d_nbit" ]]
then
tdir=$nbitdir
if [[ $USE_ALT == "" ]]
then
### set USE_ALT=07 if not set above
USE_ALT="07"
fi
else
tdir=18
### unset USE_ALT for the other topics
USE_ALT=""
fi
cmp -s tmp.test $srcdir/tfiles/$tdir/$fname.tst
cmp -s tmp.test $srcdir/tfiles/18/$fname.tst
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
dumpout $fname.h5 >tmp.test
if [[ $fname == "h5ex_d_transform" ]]
then
targ="-n"
else
targ=""
fi
dumpout $targ $fname.h5 >tmp.test
rm -f $fname.h5
cmp -s tmp.test $srcdir/tfiles/$tdir/$fname$USE_ALT.ddl
status=$?
Expand Down
2 changes: 1 addition & 1 deletion C/H5F/CMakeLists.txt → C/H5FLT/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.12)
project (HDF5Filters_C)
project (HDF5Examples_C_H5FLT)

set (dyn_examples)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions C/H5G/test.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ $ECHO_N "Testing C/H5G/h5ex_g_create...$ECHO_C"
./h5ex_g_create
dumpout h5ex_g_create.h5 >tmp.test
rm -f h5ex_g_create.h5
cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_create.ddl
cmp -s tmp.test $srcdir/tfiles/16/h5ex_g_create.ddl
status=$?
if test $status -ne 0
then
Expand All @@ -70,7 +70,7 @@ else
exout ./h5ex_g_iterate >tmp.test
rm -f h5ex_g_iterate.h5
fi
cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_iterate.tst
cmp -s tmp.test $srcdir/tfiles/16/h5ex_g_iterate.tst
status=$?
if test $status -ne 0
then
Expand All @@ -90,7 +90,7 @@ else
exout ./h5ex_g_traverse >tmp.test
rm -f h5ex_g_traverse.h5
fi
cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_traverse.tst
cmp -s tmp.test $srcdir/tfiles/16/h5ex_g_traverse.tst
status=$?
if test $status -ne 0
then
Expand Down
2 changes: 1 addition & 1 deletion C/H5P/CMakeLists.txt → C/H5PAR/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.12)
PROJECT (H5P_C)
PROJECT (H5PAR_C)

#-----------------------------------------------------------------------------
# Define Sources
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
48 changes: 27 additions & 21 deletions C/H5T/test.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,22 @@ do
then
echo " FAILED!"
else
dumpout $fname.h5 >tmp.test
rm -f $fname.h5
cmp -s tmp.test $srcdir/tfiles/18/$fname.ddl
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
echo " Passed"
fi
if [[ $fname == "h5ex_t_cpxcmpd" || $fname == "h5ex_t_cpxcmpdatt" ]]
then
targ="-n"
else
targ=""
fi
dumpout $targ $fname.h5 >tmp.test
rm -f $fname.h5
cmp -s tmp.test $srcdir/tfiles/18/$fname.ddl
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
echo " Passed"
fi
fi
return_val=`expr $status + $return_val`
done
Expand All @@ -87,13 +93,7 @@ done
#######Non-standard tests#######

USE_ALT=""
if [ "$H5_LIBVER_DIR" = "114" ]; then
# check if HDF5 version is < 1.14.3
version_compare "$H5_LIBVER" "1.10.3"
if [ "$version_lt" = 1 ]; then
USE_ALT="02"
fi
elif [ "$H5_LIBVER_DIR" = "110" ]; then
if [ "$H5_LIBVER_DIR" = "110" ]; then
# check if HDF5 version is < 1.10.7
version_compare "$H5_LIBVER" "1.10.7"
if [ "$version_lt" = 1 ]; then
Expand Down Expand Up @@ -130,7 +130,12 @@ do
else
version_compare "$H5_LIBVER" "1.12.0"
if [ "$version_lt" = 1 ]; then
cmp -s tmp.test $srcdir/tfiles/110/$fname$USE_ALT.ddl
version_compare "$H5_LIBVER" "1.10.7"
if [ "$version_lt" = 1 ]; then
cmp -s tmp.test $srcdir/tfiles/110/$fname$USE_ALT.ddl
else
cmp -s tmp.test $srcdir/tfiles/18/$fname.ddl
fi
else
cmp -s tmp.test $srcdir/tfiles/112/$fname.ddl
fi
Expand Down Expand Up @@ -159,13 +164,14 @@ do
then
echo " FAILED!"
else
dumpout -n $fname.h5 >tmp.test
dumpout $fname.h5 >tmp.test
rm -f $fname.h5
version_compare "$H5_LIBVER" "1.14.0"
version_compare "$H5_LIBVER" "1.14.3"
if [ "$version_lt" = 1 ]; then
cmp -s tmp.test $srcdir/tfiles/18/$fname.ddl
else
cmp -s tmp.test $srcdir/tfiles/114/$fname$USE_ALT.ddl
cmp -s tmp.test $srcdir/tfiles/114/$fname.ddl
fi
status=$?
if test $status -ne 0
then
Expand Down
11 changes: 0 additions & 11 deletions C/H5T/tfiles/114/h5ex_t_vlen02.ddl

This file was deleted.

17 changes: 0 additions & 17 deletions C/H5T/tfiles/114/h5ex_t_vlenatt02.ddl

This file was deleted.

2 changes: 1 addition & 1 deletion FORTRAN/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ add_subdirectory (${PROJECT_SOURCE_DIR}/H5G)
add_subdirectory (${PROJECT_SOURCE_DIR}/H5T)

if (H5_HAVE_PARALLEL AND HDF5_ENABLE_PARALLEL)
add_subdirectory (${PROJECT_SOURCE_DIR}/H5P)
add_subdirectory (${PROJECT_SOURCE_DIR}/H5PAR)
endif ()
Loading