libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 3/6] Enable parallel-tests test driver for the old testsuite.


From: Ralf Wildenhues
Subject: [PATCH 3/6] Enable parallel-tests test driver for the old testsuite.
Date: Sun, 22 Aug 2010 12:56:56 +0200
User-agent: Mutt/1.5.20 (2010-04-22)

* configure.ac: New configure test to find out whether `make'
supports order-only prerequisites; set @ORDER@ accordingly.
(AM_INIT_AUTOMAKE): Enable parallel-tests option.
* tests/defs.m4sh (prefix): Derive install prefix for tests
from the test name, to avoid clashes.
* Makefile.am (CXX_TESTS, F77_TESTS, FC_TESTS, COMMON_TESTS):
Reformat.  Adjust for renamed tests.  Add dependencies between
the respective log files of the tests, to ensure proper ordering.
Use order-only dependencies if possible, between test groups that
use the same directory.
(clean-local-legacy): Remove `_inst-*' directories as well.
Prompted by suggestion from Bob Friesenhahn.

Signed-off-by: Ralf Wildenhues <address@hidden>
---
 ChangeLog       |   14 +++
 Makefile.am     |  297 +++++++++++++++++++++++++++++++++++++++++++++----------
 configure.ac    |   30 ++++++-
 tests/defs.m4sh |    2 +-
 4 files changed, 287 insertions(+), 56 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index dcde33b..a1b2d07 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
 2010-08-22  Ralf Wildenhues  <address@hidden>
 
+       Enable parallel-tests test driver for the old testsuite.
+       * configure.ac: New configure test to find out whether `make'
+       supports order-only prerequisites; set @ORDER@ accordingly.
+       (AM_INIT_AUTOMAKE): Enable parallel-tests option.
+       * tests/defs.m4sh (prefix): Derive install prefix for tests
+       from the test name, to avoid clashes.
+       * Makefile.am (CXX_TESTS, F77_TESTS, FC_TESTS, COMMON_TESTS):
+       Reformat.  Adjust for renamed tests.  Add dependencies between
+       the respective log files of the tests, to ensure proper ordering.
+       Use order-only dependencies if possible, between test groups that
+       use the same directory.
+       (clean-local-legacy): Remove `_inst-*' directories as well.
+       Prompted by suggestion from Bob Friesenhahn.
+
        New alias scripts for old tests run more than once.
        * tests/cdemo-shared-exec.test, tests/cdemo-shared-make.test,
        tests/cdemo-static-exec.test, tests/cdemo-static-make.test,
diff --git a/Makefile.am b/Makefile.am
index 78329d2..c507497 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -608,67 +608,256 @@ clean-local: clean-local-legacy
 #           complete this section should be removed.
 
 CXX_TESTS = \
-       tests/tagdemo-static.test tests/tagdemo-make.test \
-       tests/tagdemo-exec.test tests/tagdemo-conf.test \
-       tests/tagdemo-make.test tests/tagdemo-exec.test \
-       tests/tagdemo-shared.test tests/tagdemo-make.test \
-       tests/tagdemo-exec.test tests/tagdemo-undef.test \
-       tests/tagdemo-make.test tests/tagdemo-exec.test
+       tests/tagdemo-static.test \
+       tests/tagdemo-static-make.test \
+       tests/tagdemo-static-exec.test \
+       tests/tagdemo-conf.test \
+       tests/tagdemo-make.test \
+       tests/tagdemo-exec.test \
+       tests/tagdemo-shared.test \
+       tests/tagdemo-shared-make.test \
+       tests/tagdemo-shared-exec.test \
+       tests/tagdemo-undef.test \
+       tests/tagdemo-undef-make.test \
+       tests/tagdemo-undef-exec.test
+
+tests/tagdemo-undef-exec.log:  tests/tagdemo-undef-make.log
+tests/tagdemo-undef-make.log:  tests/tagdemo-undef.log
+tests/tagdemo-undef.log:       tests/tagdemo-shared-exec.log
+tests/tagdemo-shared-exec.log: tests/tagdemo-shared-make.log
+tests/tagdemo-shared-make.log: tests/tagdemo-shared.log
+tests/tagdemo-shared.log:      tests/tagdemo-exec.log
+tests/tagdemo-exec.log:                tests/tagdemo-make.log
+tests/tagdemo-make.log:                tests/tagdemo-conf.log
+tests/tagdemo-conf.log:                tests/tagdemo-static-exec.log
+tests/tagdemo-static-exec.log: tests/tagdemo-static-make.log
+tests/tagdemo-static-make.log: tests/tagdemo-static.log
 
 F77_TESTS = \
-       tests/f77demo-static.test tests/f77demo-make.test \
-       tests/f77demo-exec.test tests/f77demo-conf.test \
-       tests/f77demo-make.test tests/f77demo-exec.test \
-       tests/f77demo-shared.test tests/f77demo-make.test \
-       tests/f77demo-exec.test
+       tests/f77demo-static.test \
+       tests/f77demo-static-make.test \
+       tests/f77demo-static-exec.test \
+       tests/f77demo-conf.test \
+       tests/f77demo-make.test \
+       tests/f77demo-exec.test \
+       tests/f77demo-shared.test \
+       tests/f77demo-shared-make.test \
+       tests/f77demo-shared-exec.test
+
+tests/f77demo-shared-exec.log: tests/f77demo-shared-make.log
+tests/f77demo-shared-make.log: tests/f77demo-shared.log
+tests/f77demo-shared.log:      tests/f77demo-exec.log
+tests/f77demo-exec.log:                tests/f77demo-make.log
+tests/f77demo-make.log:                tests/f77demo-conf.log
+tests/f77demo-conf.log:                tests/f77demo-static-exec.log
+tests/f77demo-static-exec.log: tests/f77demo-static-make.log
+tests/f77demo-static-make.log: tests/f77demo-static.log
 
 FC_TESTS = \
-       tests/fcdemo-static.test tests/fcdemo-make.test \
-       tests/fcdemo-exec.test tests/fcdemo-conf.test \
-       tests/fcdemo-make.test tests/fcdemo-exec.test \
-       tests/fcdemo-shared.test tests/fcdemo-make.test \
-       tests/fcdemo-exec.test
+       tests/fcdemo-static.test \
+       tests/fcdemo-static-make.test \
+       tests/fcdemo-static-exec.test \
+       tests/fcdemo-conf.test \
+       tests/fcdemo-make.test \
+       tests/fcdemo-exec.test \
+       tests/fcdemo-shared.test \
+       tests/fcdemo-shared-make.test \
+       tests/fcdemo-shared-exec.test
+
+tests/fcdemo-shared-exec.log:  tests/fcdemo-shared-make.log
+tests/fcdemo-shared-make.log:  tests/fcdemo-shared.log
+tests/fcdemo-shared.log:       tests/fcdemo-exec.log
+tests/fcdemo-exec.log:         tests/fcdemo-make.log
+tests/fcdemo-make.log:         tests/fcdemo-conf.log
+tests/fcdemo-conf.log:         tests/fcdemo-static-exec.log
+tests/fcdemo-static-exec.log:  tests/fcdemo-static-make.log
+tests/fcdemo-static-make.log:  tests/fcdemo-static.log
 
 COMMON_TESTS = \
-       tests/link.test tests/link-2.test tests/nomode.test \
-       tests/objectlist.test tests/quote.test tests/sh.test \
-       tests/suffix.test tests/tagtrace.test \
-       tests/cdemo-static.test tests/cdemo-make.test tests/cdemo-exec.test \
-       tests/demo-static.test tests/demo-make.test tests/demo-exec.test \
-       tests/demo-inst.test tests/demo-unst.test \
-       tests/depdemo-static.test tests/depdemo-make.test \
-       tests/depdemo-exec.test tests/depdemo-inst.test \
+       tests/link.test \
+       tests/link-2.test \
+       tests/nomode.test \
+       tests/objectlist.test \
+       tests/quote.test \
+       tests/sh.test \
+       tests/suffix.test \
+       tests/tagtrace.test \
+       tests/cdemo-static.test \
+       tests/cdemo-static-make.test \
+       tests/cdemo-static-exec.test \
+       tests/demo-static.test \
+       tests/demo-static-make.test \
+       tests/demo-static-exec.test \
+       tests/demo-static-inst.test \
+       tests/demo-static-unst.test \
+       tests/depdemo-static.test \
+       tests/depdemo-static-make.test \
+       tests/depdemo-static-exec.test \
+       tests/depdemo-static-inst.test \
+       tests/depdemo-static-unst.test \
+       tests/mdemo-static.test \
+       tests/mdemo-static-make.test \
+       tests/mdemo-static-exec.test \
+       tests/mdemo-static-inst.test \
+       tests/mdemo-static-unst.test \
+       tests/cdemo-conf.test \
+       tests/cdemo-make.test \
+       tests/cdemo-exec.test \
+       tests/demo-conf.test \
+       tests/demo-make.test \
+       tests/demo-exec.test \
+       tests/demo-inst.test \
+       tests/demo-unst.test \
+       tests/demo-deplibs.test \
+       tests/depdemo-conf.test \
+       tests/depdemo-make.test \
+       tests/depdemo-exec.test \
+       tests/depdemo-inst.test \
        tests/depdemo-unst.test \
-       tests/mdemo-static.test tests/mdemo-make.test tests/mdemo-exec.test \
-       tests/mdemo-inst.test tests/mdemo-unst.test \
-       tests/cdemo-conf.test tests/cdemo-make.test tests/cdemo-exec.test \
-       tests/demo-conf.test tests/demo-make.test tests/demo-exec.test \
-       tests/demo-inst.test tests/demo-unst.test tests/demo-deplibs.test \
-       tests/depdemo-conf.test tests/depdemo-make.test \
-       tests/depdemo-exec.test tests/depdemo-inst.test \
-       tests/depdemo-unst.test \
-       tests/mdemo-conf.test tests/mdemo-make.test tests/mdemo-exec.test \
-       tests/mdemo-inst.test tests/mdemo-unst.test tests/mdemo-dryrun.test \
-       tests/mdemo2-conf.test tests/mdemo2-make.test tests/mdemo2-exec.test \
-       tests/pdemo-conf.test tests/pdemo-make.test tests/pdemo-exec.test \
+       tests/mdemo-conf.test \
+       tests/mdemo-make.test \
+       tests/mdemo-exec.test \
+       tests/mdemo-inst.test \
+       tests/mdemo-unst.test \
+       tests/mdemo-dryrun.test \
+       tests/mdemo2-conf.test \
+       tests/mdemo2-make.test \
+       tests/mdemo2-exec.test \
+       tests/pdemo-conf.test \
+       tests/pdemo-make.test \
+       tests/pdemo-exec.test \
        tests/pdemo-inst.test \
-       tests/demo-nofast.test tests/demo-make.test tests/demo-exec.test \
-       tests/demo-inst.test tests/demo-unst.test \
-       tests/depdemo-nofast.test tests/depdemo-make.test \
-       tests/depdemo-exec.test tests/depdemo-inst.test \
-       tests/depdemo-unst.test \
-       tests/demo-pic.test tests/demo-make.test tests/demo-exec.test \
-       tests/demo-nopic.test tests/demo-make.test tests/demo-exec.test \
-       tests/cdemo-shared.test tests/cdemo-make.test tests/cdemo-exec.test \
-       tests/demo-shared.test tests/demo-make.test tests/demo-exec.test \
-       tests/demo-inst.test tests/demo-hardcode.test tests/demo-relink.test \
-       tests/demo-noinst-link.test tests/demo-unst.test \
-       tests/depdemo-shared.test tests/depdemo-make.test \
-       tests/depdemo-exec.test tests/depdemo-inst.test \
-       tests/depdemo-relink.test tests/depdemo-unst.test \
-       tests/mdemo-shared.test tests/mdemo-make.test tests/mdemo-exec.test \
-       tests/mdemo-inst.test tests/mdemo-unst.test \
-       tests/cdemo-undef.test tests/cdemo-make.test tests/cdemo-exec.test
+       tests/demo-nofast.test \
+       tests/demo-nofast-make.test \
+       tests/demo-nofast-exec.test \
+       tests/demo-nofast-inst.test \
+       tests/demo-nofast-unst.test \
+       tests/depdemo-nofast.test \
+       tests/depdemo-nofast-make.test \
+       tests/depdemo-nofast-exec.test \
+       tests/depdemo-nofast-inst.test \
+       tests/depdemo-nofast-unst.test \
+       tests/demo-pic.test \
+       tests/demo-pic-make.test \
+       tests/demo-pic-exec.test \
+       tests/demo-nopic.test \
+       tests/demo-nopic-make.test \
+       tests/demo-nopic-exec.test \
+       tests/cdemo-shared.test \
+       tests/cdemo-shared-make.test \
+       tests/cdemo-shared-exec.test \
+       tests/mdemo-shared.test \
+       tests/mdemo-shared-make.test \
+       tests/mdemo-shared-exec.test \
+       tests/mdemo-shared-inst.test \
+       tests/mdemo-shared-unst.test \
+       tests/cdemo-undef.test \
+       tests/cdemo-undef-make.test \
+       tests/cdemo-undef-exec.test \
+       tests/demo-shared.test \
+       tests/demo-shared-make.test \
+       tests/demo-shared-exec.test \
+       tests/demo-shared-inst.test \
+       tests/demo-hardcode.test \
+       tests/demo-relink.test \
+       tests/demo-noinst-link.test \
+       tests/demo-shared-unst.test \
+       tests/depdemo-shared.test \
+       tests/depdemo-shared-make.test \
+       tests/depdemo-shared-exec.test \
+       tests/depdemo-shared-inst.test \
+       tests/depdemo-relink.test \
+       tests/depdemo-shared-unst.test
+
+tests/cdemo-undef-exec.log:    tests/cdemo-undef-make.log
+tests/cdemo-undef-make.log:    tests/cdemo-undef.log
+tests/cdemo-undef.log: @ORDER@ tests/cdemo-shared-exec.log
+tests/cdemo-shared-exec.log:   tests/cdemo-shared-make.log
+tests/cdemo-shared-make.log:   tests/cdemo-shared.log
+tests/cdemo-shared.log: @ORDER@        tests/cdemo-exec.log
+tests/cdemo-exec.log:          tests/cdemo-make.log
+tests/cdemo-make.log:          tests/cdemo-conf.log
+tests/cdemo-conf.log: @ORDER@  tests/cdemo-static-exec.log
+tests/cdemo-static-exec.log:   tests/cdemo-static-make.log
+tests/cdemo-static-make.log:   tests/cdemo-static.log
+
+tests/demo-shared-unst.log:    tests/demo-noinst-link.log
+tests/demo-noinst-link.log:    tests/demo-relink.log
+tests/demo-relink.log:         tests/demo-hardcode.log
+tests/demo-hardcode.log:       tests/demo-shared-inst.log
+tests/demo-shared-inst.log:    tests/demo-shared-exec.log
+tests/demo-shared-exec.log:    tests/demo-shared-make.log
+tests/demo-shared-make.log:    tests/demo-shared.log
+tests/demo-shared.log: @ORDER@ tests/demo-nopic-exec.log
+tests/demo-nopic-exec.log:     tests/demo-nopic-make.log
+tests/demo-nopic-make.log:     tests/demo-nopic.log
+tests/demo-nopic.log: @ORDER@  tests/demo-pic-exec.log
+tests/demo-pic-exec.log:       tests/demo-pic-make.log
+tests/demo-pic-make.log:       tests/demo-pic.log
+tests/demo-pic.log: @ORDER@    tests/demo-nofast-unst.log
+tests/demo-nofast-unst.log:    tests/demo-nofast-inst.log
+tests/demo-nofast-inst.log:    tests/demo-nofast-exec.log
+tests/demo-nofast-exec.log:    tests/demo-nofast-make.log
+tests/demo-nofast-make.log:    tests/demo-nofast.log
+tests/demo-nofast.log: @ORDER@ tests/demo-deplibs.log
+tests/demo-deplibs.log:                tests/demo-unst.log
+tests/demo-unst.log:           tests/demo-inst.log
+tests/demo-inst.log:           tests/demo-exec.log
+tests/demo-exec.log:           tests/demo-make.log
+tests/demo-make.log:           tests/demo-conf.log
+tests/demo-conf.log: @ORDER@   tests/demo-static-unst.log
+tests/demo-static-unst.log:    tests/demo-static-inst.log
+tests/demo-static-inst.log:    tests/demo-static-exec.log
+tests/demo-static-exec.log:    tests/demo-static-make.log
+tests/demo-static-make.log:    tests/demo-static.log
+
+tests/depdemo-shared-unst.log: tests/depdemo-relink.log
+tests/depdemo-relink.log:      tests/depdemo-shared-inst.log
+tests/depdemo-shared-inst.log: tests/depdemo-shared-exec.log
+tests/depdemo-shared-exec.log: tests/depdemo-shared-make.log
+tests/depdemo-shared-make.log: tests/depdemo-shared.log
+tests/depdemo-shared.log: @ORDER@ tests/depdemo-nofast-unst.log
+tests/depdemo-nofast-unst.log: tests/depdemo-nofast-inst.log
+tests/depdemo-nofast-inst.log: tests/depdemo-nofast-exec.log
+tests/depdemo-nofast-exec.log: tests/depdemo-nofast-make.log
+tests/depdemo-nofast-make.log: tests/depdemo-nofast.log
+tests/depdemo-nofast.log: @ORDER@ tests/depdemo-unst.log
+tests/depdemo-unst.log:                tests/depdemo-inst.log
+tests/depdemo-inst.log:                tests/depdemo-exec.log
+tests/depdemo-exec.log:                tests/depdemo-make.log
+tests/depdemo-make.log:                tests/depdemo-conf.log
+tests/depdemo-conf.log: @ORDER@        tests/depdemo-static-unst.log
+tests/depdemo-static-unst.log: tests/depdemo-static-inst.log
+tests/depdemo-static-inst.log: tests/depdemo-static-exec.log
+tests/depdemo-static-exec.log: tests/depdemo-static-make.log
+tests/depdemo-static-make.log: tests/depdemo-static.log
+
+tests/mdemo-shared-unst.log:   tests/mdemo-shared-inst.log
+tests/mdemo-shared-inst.log:   tests/mdemo-shared-exec.log
+tests/mdemo-shared-exec.log:   tests/mdemo-shared-make.log
+tests/mdemo-shared-make.log:   tests/mdemo-shared.log
+tests/mdemo-shared.log: @ORDER@        tests/mdemo-dryrun.log \
+                               tests/mdemo2-exec.log
+
+tests/mdemo-dryrun.log:                tests/mdemo-unst.log
+tests/mdemo-unst.log:          tests/mdemo-inst.log
+tests/mdemo-inst.log:          tests/mdemo-exec.log
+tests/mdemo-exec.log:          tests/mdemo-make.log
+tests/mdemo-make.log:          tests/mdemo-conf.log
+tests/mdemo-conf.log: @ORDER@  tests/mdemo-static-unst.log
+tests/mdemo-static-unst.log:   tests/mdemo-static-inst.log
+tests/mdemo-static-inst.log:   tests/mdemo-static-exec.log
+tests/mdemo-static-exec.log:   tests/mdemo-static-make.log
+tests/mdemo-static-make.log:   tests/mdemo-static.log
+
+tests/mdemo2-exec.log:         tests/mdemo2-make.log
+tests/mdemo2-make.log:         tests/mdemo2-conf.log \
+                               tests/mdemo-dryrun.log
+
+tests/pdemo-inst.log:          tests/pdemo-exec.log
+tests/pdemo-exec.log:          tests/pdemo-make.log
+tests/pdemo-make.log:          tests/pdemo-conf.log
+
 
 TESTS = $(COMMON_TESTS)
 if HAVE_CXX
@@ -708,7 +897,7 @@ clean-local-legacy:
        do \
            test -f $$dir/Makefile && ( cd $$dir && $(MAKE) distclean; ); \
        done
-       rm -rf _inst
+       rm -rf _inst _inst-*
 
 $(TESTS): tests/defs
 DISTCLEANFILES += tests/defs
diff --git a/configure.ac b/configure.ac
index e1d55ef..609051c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -126,7 +126,7 @@ AC_SUBST([package_revision])
 dnl These are bootstrap requirements! Once built, libtool may work with
 dnl much older releases of autoconf and automake.  See release notes.
 dnl 1.11 is needed for color-tests, 1.11.1 fixes a security issue.
-AM_INIT_AUTOMAKE([1.11.1 gnu subdir-objects dist-lzma color-tests])
+AM_INIT_AUTOMAKE([1.11.1 gnu subdir-objects dist-lzma color-tests 
parallel-tests])
 
 dnl We use m4sh to generate libtool's portable shell scripts
 AC_SUBST([M4SH], ['$(AUTOM4TE) --language=m4sh'])
@@ -196,6 +196,34 @@ AM_CONDITIONAL(HAVE_FC,[test -n "[$]_LT_TAGVAR(compiler, 
FC)"])
 AM_CONDITIONAL(HAVE_GCJ, [test -n "[$]_LT_TAGVAR(compiler, GCJ)"])
 AM_CONDITIONAL(HAVE_RC, [test -n "[$]_LT_TAGVAR(compiler, RC)"])
 
+## Whether `make' supports order-only prerequisites.
+AC_CACHE_CHECK([whether ${MAKE-make} supports order-only prerequisites],
+  [lt_cv_make_order_only],
+  [mkdir conftest.dir
+   cd conftest.dir
+   touch b
+   touch a
+cat >confmk << 'END'
+a: b | c
+a b c:
+       touch $[]@
+END
+   touch c
+   if ${MAKE-make} -s -q -f confmk 2>/dev/null; then
+     lt_cv_make_order_only=yes
+   else
+     lt_cv_make_order_only=no
+   fi
+   cd ..
+   rm -rf conftest.dir
+])
+if test $lt_cv_make_order_only = yes; then
+  ORDER='|'
+else
+  ORDER=''
+fi
+AC_SUBST([ORDER])
+
 ## ------------- ##
 ## Documentation ##
 ## ------------- ##
diff --git a/tests/defs.m4sh b/tests/defs.m4sh
index 183783e..50fce10 100644
--- a/tests/defs.m4sh
+++ b/tests/defs.m4sh
@@ -346,7 +346,7 @@ func_exec ()
 }
 
 # Shared global variables for test scripts
-prefix="./_inst"
+prefix=./_inst-`echo "$0" | sed 's,.*/,,; s,-.*,,'`
 srcdir=`cd $srcdir && pwd`
 m4dir=$srcdir/libltdl/m4
 auxdir=$srcdir/libltdl/config
-- 
1.7.2.1.222.g9988




reply via email to

[Prev in Thread] Current Thread [Next in Thread]