diff --git a/tests/general/Makefile.am b/tests/general/Makefile.am index c850fe213f8..defa2e13896 100644 --- a/tests/general/Makefile.am +++ b/tests/general/Makefile.am @@ -6,24 +6,19 @@ # Put together AM_CPPFLAGS and AM_LDFLAGS. include $(top_srcdir)/set_flags.am +AM_CPPFLAGS += -I${top_builddir}/tests/general/util + SRCDIRS = util # Build the test for make check. -# check_PROGRAMS = pio_init_finalize -# pio_init_finalize_SOURCES = pio_init_finalize.F90 util/pio_tutil.F90 -# pio_init_finalize_LDADD = ${top_builddir}/src/flib/libpiof.la ${top_builddir}/src/clib/libpio.la - -# Build these uninstalled convenience libraries. -# noinst_LTLIBRARIES = libglobal_vars.la libncdf_tests.la \ -# libbasic_tests.la - -# # The convenience libraries depends on their source. -# libglobal_vars_la_SOURCES = global_vars.F90 -# libncdf_tests_la_SOURCES = ncdf_tests.F90 -# libbasic_tests_la_SOURCES = basic_tests.F90 +check_PROGRAMS = pio_init_finalize +pio_init_finalize_SOURCES = pio_init_finalize.F90 +pio_init_finalize_LDADD = util/libpio_tutil.la \ +${top_builddir}/src/flib/libpiof.la \ +${top_builddir}/src/clib/libpio.la # Tests will run from a bash script. -#TESTS = run_tests.sh +TESTS = run_tests.sh # Distribute the test script. EXTRA_DIST = CMakeLists.txt run_tests.sh ncdf_fail.F90.in2 \ diff --git a/tests/general/util/pio_tutil.F90 b/tests/general/util/pio_tutil.F90 index 43c0b634b4a..43717f848a7 100644 --- a/tests/general/util/pio_tutil.F90 +++ b/tests/general/util/pio_tutil.F90 @@ -286,10 +286,12 @@ SUBROUTINE PIO_TF_Get_nc_iotypes(iotypes, iotype_descs, num_iotypes) #ifdef _NETCDF4 ! netcdf, netcdf4p, netcdf4c num_iotypes = num_iotypes + 3 -#elif _NETCDF +#else +#ifdef _NETCDF ! netcdf num_iotypes = num_iotypes + 1 #endif +#endif #ifdef _PNETCDF ! pnetcdf num_iotypes = num_iotypes + 1 @@ -317,11 +319,13 @@ SUBROUTINE PIO_TF_Get_nc_iotypes(iotypes, iotype_descs, num_iotypes) iotypes(i) = PIO_iotype_netcdf4p iotype_descs(i) = "NETCDF4P" i = i + 1 -#elif _NETCDF +#else +#ifdef _NETCDF ! netcdf iotypes(i) = PIO_iotype_netcdf iotype_descs(i) = "NETCDF" i = i + 1 +#endif #endif END SUBROUTINE @@ -402,10 +406,12 @@ SUBROUTINE PIO_TF_Get_iotypes(iotypes, iotype_descs, num_iotypes) num_iotypes = 0 #ifdef _NETCDF4 ! netcdf, netcdf4p, netcdf4c - num_iotypes = num_iotypes + 3 -#elif _NETCDF + num_iotypes = num_iotypes + 3 +#else +#ifdef _NETCDF ! netcdf - num_iotypes = num_iotypes + 1 + num_iotypes = num_iotypes + 1 +#endif #endif #ifdef _PNETCDF ! pnetcdf @@ -434,11 +440,13 @@ SUBROUTINE PIO_TF_Get_iotypes(iotypes, iotype_descs, num_iotypes) iotypes(i) = PIO_iotype_netcdf4p iotype_descs(i) = "NETCDF4P" i = i + 1 -#elif _NETCDF +#else +#ifdef _NETCDF ! netcdf iotypes(i) = PIO_iotype_netcdf iotype_descs(i) = "NETCDF" i = i + 1 +#endif #endif END SUBROUTINE