From 8bd12e3a817d7d65053c949cf5bb1aaf67fbd8b2 Mon Sep 17 00:00:00 2001
From: Uwe Schulzweida <uwe.schulzweida@mpimet.mpg.de>
Date: Mon, 27 Aug 2012 08:44:04 +0000
Subject: [PATCH] tests: update from cdi-pio

---
 Makefile.am       |  2 +-
 Makefile.in       | 14 ++++++++------
 configure         | 46 +++++++++++++++++++++++++++++++---------------
 configure.ac      | 28 ++++++++++++++--------------
 tests/Makefile.am |  6 +++---
 tests/Makefile.in |  4 +---
 6 files changed, 58 insertions(+), 42 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index ce608a408..445f4c2f0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
 ## Process this file with automake to produce Makefile.in
 #
-SUBDIRS = src interfaces app examples
+SUBDIRS = src interfaces app examples tests
 #
 EXTRA_DIST=config/default \
 	doc/cdi_cman.pdf \
diff --git a/Makefile.in b/Makefile.in
index 9cddbf942..fdac892bc 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -54,10 +54,10 @@ subdir = .
 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
 	$(srcdir)/Makefile.in $(srcdir)/cdi.settings.in \
 	$(top_srcdir)/configure $(top_srcdir)/src/pkgconfig/cdi.pc.in \
-	AUTHORS COPYING ChangeLog INSTALL NEWS config/compile \
-	config/config.guess config/config.sub config/depcomp \
-	config/install-sh config/ltmain.sh config/missing \
-	config/mkinstalldirs
+	$(top_srcdir)/util/serialrun.in AUTHORS COPYING ChangeLog \
+	INSTALL NEWS config/compile config/config.guess \
+	config/config.sub config/depcomp config/install-sh \
+	config/ltmain.sh config/missing config/mkinstalldirs
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps =  \
 	$(top_srcdir)/m4/acx_assert_lang_is_fortran_variant.m4 \
@@ -77,7 +77,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  configure.lineno config.status.lineno
 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/src/config.h
-CONFIG_CLEAN_FILES = cdi.settings src/pkgconfig/cdi.pc
+CONFIG_CLEAN_FILES = util/serialrun cdi.settings src/pkgconfig/cdi.pc
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
@@ -317,7 +317,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 
 #
-SUBDIRS = src interfaces app examples
+SUBDIRS = src interfaces app examples tests
 #
 EXTRA_DIST = config/default \
 	doc/cdi_cman.pdf \
@@ -369,6 +369,8 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
 $(am__aclocal_m4_deps):
+util/serialrun: $(top_builddir)/config.status $(top_srcdir)/util/serialrun.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
 cdi.settings: $(top_builddir)/config.status $(srcdir)/cdi.settings.in
 	cd $(top_builddir) && $(SHELL) ./config.status $@
 src/pkgconfig/cdi.pc: $(top_builddir)/config.status $(top_srcdir)/src/pkgconfig/cdi.pc.in
diff --git a/configure b/configure
index e9f2a20a0..5c2d0c75c 100755
--- a/configure
+++ b/configure
@@ -26950,21 +26950,10 @@ fi
 
 
 
-#  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/pio_write_run \
-#                   tests/pio_cksum_mpinonb \
-#                   tests/pio_cksum_fpguard \
-#                   tests/pio_cksum_asynch \
-#                   tests/pio_cksum_writer \
-#                   util/serialrun],[chmod a+x "$ac_file"])
-
-ac_config_files="$ac_config_files Makefile src/Makefile interfaces/Makefile app/Makefile examples/Makefile cdi.settings src/pkgconfig/cdi.pc"
+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/pio_write_run tests/pio_cksum_mpinonb tests/pio_cksum_fpguard tests/pio_cksum_asynch tests/pio_cksum_writer util/serialrun"
+
+
+ac_config_files="$ac_config_files Makefile src/Makefile interfaces/Makefile app/Makefile tests/Makefile examples/Makefile cdi.settings src/pkgconfig/cdi.pc"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -28283,10 +28272,24 @@ do
     "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;;
     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+    "tests/test_cksum_grib") CONFIG_FILES="$CONFIG_FILES tests/test_cksum_grib" ;;
+    "tests/test_cksum_nc") CONFIG_FILES="$CONFIG_FILES tests/test_cksum_nc" ;;
+    "tests/test_cksum_nc2") CONFIG_FILES="$CONFIG_FILES tests/test_cksum_nc2" ;;
+    "tests/test_cksum_nc4") CONFIG_FILES="$CONFIG_FILES tests/test_cksum_nc4" ;;
+    "tests/test_cksum_extra") CONFIG_FILES="$CONFIG_FILES tests/test_cksum_extra" ;;
+    "tests/test_cksum_service") CONFIG_FILES="$CONFIG_FILES tests/test_cksum_service" ;;
+    "tests/test_cksum_ieg") CONFIG_FILES="$CONFIG_FILES tests/test_cksum_ieg" ;;
+    "tests/pio_write_run") CONFIG_FILES="$CONFIG_FILES tests/pio_write_run" ;;
+    "tests/pio_cksum_mpinonb") CONFIG_FILES="$CONFIG_FILES tests/pio_cksum_mpinonb" ;;
+    "tests/pio_cksum_fpguard") CONFIG_FILES="$CONFIG_FILES tests/pio_cksum_fpguard" ;;
+    "tests/pio_cksum_asynch") CONFIG_FILES="$CONFIG_FILES tests/pio_cksum_asynch" ;;
+    "tests/pio_cksum_writer") CONFIG_FILES="$CONFIG_FILES tests/pio_cksum_writer" ;;
+    "util/serialrun") CONFIG_FILES="$CONFIG_FILES util/serialrun" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
     "interfaces/Makefile") CONFIG_FILES="$CONFIG_FILES interfaces/Makefile" ;;
     "app/Makefile") CONFIG_FILES="$CONFIG_FILES app/Makefile" ;;
+    "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
     "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
     "cdi.settings") CONFIG_FILES="$CONFIG_FILES cdi.settings" ;;
     "src/pkgconfig/cdi.pc") CONFIG_FILES="$CONFIG_FILES src/pkgconfig/cdi.pc" ;;
@@ -30096,6 +30099,19 @@ compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
 _LT_EOF
 
  ;;
+    "tests/test_cksum_grib":F) chmod a+x "$ac_file" ;;
+    "tests/test_cksum_nc":F) chmod a+x "$ac_file" ;;
+    "tests/test_cksum_nc2":F) chmod a+x "$ac_file" ;;
+    "tests/test_cksum_nc4":F) chmod a+x "$ac_file" ;;
+    "tests/test_cksum_extra":F) chmod a+x "$ac_file" ;;
+    "tests/test_cksum_service":F) chmod a+x "$ac_file" ;;
+    "tests/test_cksum_ieg":F) chmod a+x "$ac_file" ;;
+    "tests/pio_write_run":F) chmod a+x "$ac_file" ;;
+    "tests/pio_cksum_mpinonb":F) chmod a+x "$ac_file" ;;
+    "tests/pio_cksum_fpguard":F) chmod a+x "$ac_file" ;;
+    "tests/pio_cksum_asynch":F) chmod a+x "$ac_file" ;;
+    "tests/pio_cksum_writer":F) chmod a+x "$ac_file" ;;
+    "util/serialrun":F) chmod a+x "$ac_file" ;;
 
   esac
 done # for ac_tag
diff --git a/configure.ac b/configure.ac
index ed55f6135..ed0b15bde 100644
--- a/configure.ac
+++ b/configure.ac
@@ -179,22 +179,22 @@ AM_CONDITIONAL([USE_FC],[test -n "$FC" && test "X$FC" != "Xno" && test x$acx_cv_
 
 AC_SUBST([CPPFLAGS])
 
-#  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/pio_write_run \
-#                   tests/pio_cksum_mpinonb \
-#                   tests/pio_cksum_fpguard \
-#                   tests/pio_cksum_asynch \
-#                   tests/pio_cksum_writer \
-#                   util/serialrun],[chmod a+x "$ac_file"])
+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/pio_write_run \
+                 tests/pio_cksum_mpinonb \
+                 tests/pio_cksum_fpguard \
+                 tests/pio_cksum_asynch \
+                 tests/pio_cksum_writer \
+                 util/serialrun],[chmod a+x "$ac_file"])
 
 AC_OUTPUT([Makefile src/Makefile interfaces/Makefile app/Makefile \
-	examples/Makefile cdi.settings \
+	tests/Makefile examples/Makefile cdi.settings \
         src/pkgconfig/cdi.pc])
 
 #  ----------------------------------------------------------------------
diff --git a/tests/Makefile.am b/tests/Makefile.am
index ce6de1c8d..1ae1d2505 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,9 +1,9 @@
 ## Process this file with automake to produce Makefile.in
 #
 TESTS = test_grib.sh test_cksum_grib test_cksum_nc test_cksum_extra \
-	test_cksum_service test_cksum_nc2 test_cksum_nc4 test_cksum_ieg \
-	pio_write_run pio_cksum_mpinonb pio_cksum_fpguard \
-	pio_cksum_asynch pio_cksum_writer
+	test_cksum_service test_cksum_nc2 test_cksum_nc4 test_cksum_ieg
+#	pio_write_run pio_cksum_mpinonb pio_cksum_fpguard \
+#	pio_cksum_asynch pio_cksum_writer
 check_PROGRAMS = test_grib cksum_write cksum_read pio_write
 #
 test_grib_SOURCES = test_grib.c
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 022418299..052f81c4a 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -304,9 +304,7 @@ top_srcdir = @top_srcdir@
 
 #
 TESTS = test_grib.sh test_cksum_grib test_cksum_nc test_cksum_extra \
-	test_cksum_service test_cksum_nc2 test_cksum_nc4 test_cksum_ieg \
-	pio_write_run pio_cksum_mpinonb pio_cksum_fpguard \
-	pio_cksum_asynch pio_cksum_writer
+	test_cksum_service test_cksum_nc2 test_cksum_nc4 test_cksum_ieg
 
 #
 test_grib_SOURCES = test_grib.c
-- 
GitLab