Commit d56e7a11 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Improve flexibility of tests.

* This way it becomes easy to inject program starters for all parts of the
  tests, which makes working in cross-compilation setups much easier.
parent 4e6a14dd
......@@ -30708,7 +30708,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
 
 
ac_config_files="$ac_config_files tests/test_cksum_grib tests/test_cksum_nc tests/test_cksum_nc2 tests/test_cksum_nc4 tests/test_cksum_extra tests/test_cksum_service tests/test_cksum_ieg tests/test_chunk_cksum tests/test_f2003 tests/pio_write_run tests/pio_write_deco2d_run tests/pio_cksum_mpinonb tests/pio_cksum_mpi_fw_ordered tests/pio_cksum_mpi_fw_at_all tests/pio_cksum_mpi_fw_at_reblock tests/pio_cksum_fpguard tests/pio_cksum_asynch tests/pio_cksum_writer tests/pio_cksum_cdf tests/test_resource_copy_mpi_run tests/test_cdf_transformation tests/test_cdf_const tables/gen_tableheaderfile util/serialrun"
ac_config_files="$ac_config_files tests/test_cksum_grib tests/test_cksum_nc tests/test_cksum_nc2 tests/test_cksum_nc4 tests/test_cksum_extra tests/test_cksum_service tests/test_cksum_ieg tests/test_chunk_cksum tests/test_f2003 tests/pio_write_run tests/pio_write_deco2d_run tests/pio_cksum_mpinonb tests/pio_cksum_mpi_fw_ordered tests/pio_cksum_mpi_fw_at_all tests/pio_cksum_mpi_fw_at_reblock tests/pio_cksum_fpguard tests/pio_cksum_asynch tests/pio_cksum_writer tests/pio_cksum_cdf tests/test_byteswap_run tests/test_resource_copy_run tests/test_resource_copy_mpi_run tests/test_cdf_transformation tests/test_cdf_const tests/test_table_run tables/gen_tableheaderfile util/serialrun"
 
 
ac_config_files="$ac_config_files Makefile src/Makefile interfaces/Makefile app/Makefile tests/Makefile examples/Makefile cdi.settings examples/pio/Makefile src/pkgconfig/cdi.pc src/pkgconfig/cdipio.pc"
......@@ -32097,9 +32097,12 @@ do
"tests/pio_cksum_asynch") CONFIG_FILES="$CONFIG_FILES tests/pio_cksum_asynch" ;;
"tests/pio_cksum_writer") CONFIG_FILES="$CONFIG_FILES tests/pio_cksum_writer" ;;
"tests/pio_cksum_cdf") CONFIG_FILES="$CONFIG_FILES tests/pio_cksum_cdf" ;;
"tests/test_byteswap_run") CONFIG_FILES="$CONFIG_FILES tests/test_byteswap_run" ;;
"tests/test_resource_copy_run") CONFIG_FILES="$CONFIG_FILES tests/test_resource_copy_run" ;;
"tests/test_resource_copy_mpi_run") CONFIG_FILES="$CONFIG_FILES tests/test_resource_copy_mpi_run" ;;
"tests/test_cdf_transformation") CONFIG_FILES="$CONFIG_FILES tests/test_cdf_transformation" ;;
"tests/test_cdf_const") CONFIG_FILES="$CONFIG_FILES tests/test_cdf_const" ;;
"tests/test_table_run") CONFIG_FILES="$CONFIG_FILES tests/test_table_run" ;;
"tables/gen_tableheaderfile") CONFIG_FILES="$CONFIG_FILES tables/gen_tableheaderfile" ;;
"util/serialrun") CONFIG_FILES="$CONFIG_FILES util/serialrun" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
......@@ -33922,9 +33925,12 @@ _LT_EOF
"tests/pio_cksum_asynch":F) chmod a+x "$ac_file" ;;
"tests/pio_cksum_writer":F) chmod a+x "$ac_file" ;;
"tests/pio_cksum_cdf":F) chmod a+x "$ac_file" ;;
"tests/test_byteswap_run":F) chmod a+x "$ac_file" ;;
"tests/test_resource_copy_run":F) chmod a+x "$ac_file" ;;
"tests/test_resource_copy_mpi_run":F) chmod a+x "$ac_file" ;;
"tests/test_cdf_transformation":F) chmod a+x "$ac_file" ;;
"tests/test_cdf_const":F) chmod a+x "$ac_file" ;;
"tests/test_table_run":F) chmod a+x "$ac_file" ;;
"tables/gen_tableheaderfile":F) chmod a+x "$ac_file" ;;
"util/serialrun":F) chmod a+x "$ac_file" ;;
 
......@@ -430,9 +430,12 @@ AC_CONFIG_FILES([tests/test_cksum_grib \
tests/pio_cksum_asynch \
tests/pio_cksum_writer \
tests/pio_cksum_cdf \
tests/test_byteswap_run \
tests/test_resource_copy_run \
tests/test_resource_copy_mpi_run \
tests/test_cdf_transformation \
tests/test_cdf_const \
tests/test_table_run \
tables/gen_tableheaderfile \
util/serialrun],[chmod a+x "$ac_file"])
......
......@@ -10,9 +10,9 @@ TESTS = cksum_verify \
pio_cksum_mpi_fw_ordered \
pio_cksum_mpi_fw_at_all \
pio_cksum_mpi_fw_at_reblock \
test_resource_copy pio_write_deco2d_run \
test_resource_copy_run pio_write_deco2d_run \
test_f2003 test_cdf_transformation test_cdf_const \
test_table test_byteswap
test_table_run test_byteswap_run
check_PROGRAMS = cksum_verify test_grib cksum_write cksum_read pio_write \
test_resource_copy cksum_write_chunk pio_write_deco2d test_table \
......
......@@ -83,9 +83,9 @@ TESTS = cksum_verify$(EXEEXT) test_cksum_grib test_cksum_nc \
pio_cksum_mpinonb pio_cksum_fpguard pio_cksum_asynch \
pio_cksum_writer pio_cksum_cdf pio_cksum_mpi_fw_ordered \
pio_cksum_mpi_fw_at_all pio_cksum_mpi_fw_at_reblock \
test_resource_copy$(EXEEXT) pio_write_deco2d_run test_f2003 \
test_cdf_transformation test_cdf_const test_table$(EXEEXT) \
test_byteswap$(EXEEXT) $(am__append_2)
test_resource_copy_run pio_write_deco2d_run test_f2003 \
test_cdf_transformation test_cdf_const test_table_run \
test_byteswap_run $(am__append_2)
check_PROGRAMS = cksum_verify$(EXEEXT) test_grib$(EXEEXT) \
cksum_write$(EXEEXT) cksum_read$(EXEEXT) pio_write$(EXEEXT) \
test_resource_copy$(EXEEXT) cksum_write_chunk$(EXEEXT) \
......@@ -109,9 +109,12 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(srcdir)/pio_cksum_mpi_fw_at_reblock.in \
$(srcdir)/pio_cksum_fpguard.in $(srcdir)/pio_cksum_asynch.in \
$(srcdir)/pio_cksum_writer.in $(srcdir)/pio_cksum_cdf.in \
$(srcdir)/test_byteswap_run.in \
$(srcdir)/test_resource_copy_run.in \
$(srcdir)/test_resource_copy_mpi_run.in \
$(srcdir)/test_cdf_transformation.in \
$(srcdir)/test_cdf_const.in $(top_srcdir)/config/depcomp
$(srcdir)/test_cdf_const.in $(srcdir)/test_table_run.in \
$(top_srcdir)/config/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = \
$(top_srcdir)/m4/acx_assert_lang_is_fortran_variant.m4 \
......@@ -151,8 +154,9 @@ CONFIG_CLEAN_FILES = test_cksum_grib test_cksum_nc test_cksum_nc2 \
pio_write_deco2d_run pio_cksum_mpinonb \
pio_cksum_mpi_fw_ordered pio_cksum_mpi_fw_at_all \
pio_cksum_mpi_fw_at_reblock pio_cksum_fpguard pio_cksum_asynch \
pio_cksum_writer pio_cksum_cdf test_resource_copy_mpi_run \
test_cdf_transformation test_cdf_const
pio_cksum_writer pio_cksum_cdf test_byteswap_run \
test_resource_copy_run test_resource_copy_mpi_run \
test_cdf_transformation test_cdf_const test_table_run
CONFIG_CLEAN_VPATH_FILES =
@ENABLE_NETCDF_TRUE@am__EXEEXT_1 = test_cdf_write$(EXEEXT) \
@ENABLE_NETCDF_TRUE@ test_cdf_read$(EXEEXT)
......@@ -633,12 +637,18 @@ pio_cksum_writer: $(top_builddir)/config.status $(srcdir)/pio_cksum_writer.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
pio_cksum_cdf: $(top_builddir)/config.status $(srcdir)/pio_cksum_cdf.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
test_byteswap_run: $(top_builddir)/config.status $(srcdir)/test_byteswap_run.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
test_resource_copy_run: $(top_builddir)/config.status $(srcdir)/test_resource_copy_run.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
test_resource_copy_mpi_run: $(top_builddir)/config.status $(srcdir)/test_resource_copy_mpi_run.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
test_cdf_transformation: $(top_builddir)/config.status $(srcdir)/test_cdf_transformation.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
test_cdf_const: $(top_builddir)/config.status $(srcdir)/test_cdf_const.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
test_table_run: $(top_builddir)/config.status $(srcdir)/test_table_run.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
clean-checkPROGRAMS:
@list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
......
#! @SHELL@
../libtool --mode=execute ${tool_wrap} ./test_byteswap
#
# Local Variables:
# mode: sh
# End:
#
......@@ -6,9 +6,13 @@ if [ @ENABLE_NETCDF@ = yes ]; then
mkdir -p test_cdf_const.d
cd test_cdf_const.d
\rm -f *
@abs_top_builddir@/examples/cdi_write_const
( @abs_top_builddir@/app/cdi -s example_const.nc \
&& @abs_top_builddir@/app/cdi example_const.nc) >cdi.$$.stdout 2>cdi.$$.stderr
../../libtool --mode=execute ${tool_wrap} \
@abs_top_builddir@/examples/cdi_write_const
( ../../libtool --mode=execute ${tool_wrap} \
@abs_top_builddir@/app/cdi -s example_const.nc \
&& ../../libtool --mode=execute ${tool_wrap} \
@abs_top_builddir@/app/cdi example_const.nc) \
>cdi.$$.stdout 2>cdi.$$.stderr
echo "$0"
exec 6<cdi.$$.stdout 7<../"$0"
while read pattern <&7 ; do
......
......@@ -7,8 +7,8 @@ fi
ncdatafile="test$$.nc"
tempfiles="${ncdatafile}"
trap "EC=\$? ; \rm -f ${tempfiles}; exit \$EC" EXIT
./test_cdf_write "${ncdatafile}"
digest=$(./test_cdf_read "${ncdatafile}")
../libtool --mode=execute ${tool_wrap} ./test_cdf_write "${ncdatafile}"
digest=$(../libtool --mode=execute ${tool_wrap} ./test_cdf_read "${ncdatafile}")
missValueCount=$(echo "$digest" | @SED@ -n '/^missing values count =/{
s/^missing values count *= *//
p
......
......@@ -4,8 +4,8 @@ set -e
format=nc
if [ @ENABLE_NETCDF@ = yes ]; then
exec >test_chunk_cksum_$format.log 2>&1
./cksum_write_chunk -m 17
./cksum_read example.$format
../libtool --mode=execute ${tool_wrap} ./cksum_write_chunk -m 17
../libtool --mode=execute ${tool_wrap} ./cksum_read example.$format
\rm example.cksum example.$format
\rm test_chunk_cksum_$format.log
else
......
#! /bin/sh
# this file is meant to be included for the supported file formats
exec >test_cksum_$format.log 2>&1
../libtool --mode=execute ${tool_wrap} ./cksum_write -f $format
../libtool --mode=execute ${tool_wrap} ./cksum_read example.$format
\rm example.cksum example.$format
\rm test_cksum_$format.log
#
# Local Variables:
# mode: sh
# End:
#
......@@ -3,11 +3,7 @@
set -e
format=ext
if [ @ENABLE_EXTRA@ = yes ]; then
exec >test_cksum_$format.log 2>&1
./cksum_write -f $format
./cksum_read example.$format
\rm example.cksum example.$format
\rm test_cksum_$format.log
. ${srcdir}/test_cksum_base
else
# skip tests for unsupported formats
exit 77
......
#! /bin/sh
#! @SHELL@
set -e
format=grb
if [ @ENABLE_GRIB@ = yes ]; then
exec >test_cksum_$format.log 2>&1
./cksum_write -f $format
./cksum_read example.$format
\rm example.cksum example.$format
\rm test_cksum_$format.log
. ${srcdir}/test_cksum_base
else
# skip tests for unsupported formats
exit 77
fi
#
# Local Variables:
# mode: sh
# End:
#
......@@ -3,11 +3,7 @@
set -e
format=ieg
if [ @ENABLE_IEG@ = yes ]; then
exec >test_cksum_$format.log 2>&1
./cksum_write -f $format
./cksum_read example.$format
\rm example.cksum example.$format
\rm test_cksum_$format.log
. ${srcdir}/test_cksum_base
else
# skip tests for unsupported formats
exit 77
......
......@@ -3,11 +3,7 @@
set -e
format=nc
if [ @ENABLE_NETCDF@ = yes ]; then
exec >test_cksum_$format.log 2>&1
./cksum_write -f $format
./cksum_read example.$format
\rm example.cksum example.$format
\rm test_cksum_$format.log
. ${srcdir}/test_cksum_base
else
# skip tests for unsupported formats
exit 77
......
......@@ -3,11 +3,7 @@
set -e
format=nc2
if [ @ENABLE_NC2@ = yes ]; then
exec >test_cksum_$format.log 2>&1
./cksum_write -f $format
./cksum_read example.$format
\rm example.cksum example.$format
\rm test_cksum_$format.log
. ${srcdir}/test_cksum_base
else
# skip tests for unsupported formats
exit 77
......
......@@ -3,11 +3,7 @@
set -e
format=nc4
if [ @ENABLE_NC4@ = yes ]; then
exec >test_cksum_$format.log 2>&1
./cksum_write -f $format
./cksum_read example.$format
\rm example.cksum example.$format
\rm test_cksum_$format.log
. ${srcdir}/test_cksum_base
else
# skip tests for unsupported formats
exit 77
......
......@@ -3,11 +3,7 @@
set -e
format=svc
if [ @ENABLE_SERVICE@ = yes ]; then
exec >test_cksum_$format.log 2>&1
./cksum_write -f $format
./cksum_read example.$format
\rm example.cksum example.$format
\rm test_cksum_$format.log
. ${srcdir}/test_cksum_base
else
# skip tests for unsupported formats
exit 77
......
......@@ -4,8 +4,10 @@ set -e
format=nc
if [ @ENABLE_NETCDF@ = yes -a @ENABLE_F2003_ISOC@ = yes ]; then
exec >test_f2003_$format.log 2>&1
@abs_top_builddir@/examples/cdi_write_f2003
@abs_top_builddir@/examples/cdi_read_f2003 \
../libtool --mode=execute ${tool_wrap} \
@abs_top_builddir@/examples/cdi_write_f2003
../libtool --mode=execute ${tool_wrap} \
@abs_top_builddir@/examples/cdi_read_f2003 \
>cdi_read_f2003.$$.stdout \
2>cdi_read_f2003.$$.stderr
echo "$0"
......
#! @SHELL@
set -e
../libtool --mode=execute ${tool_wrap} \
./test_resource_copy
#
# Local Variables:
# mode: sh
# End:
#
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment