automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, ad-parallel-tests, updated.


From: Ralf Wildenhues
Subject: [Automake-commit] [SCM] GNU Automake branch, ad-parallel-tests, updated. Release-1-10-289-g1b67aa7
Date: Sat, 28 Mar 2009 21:16:15 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=1b67aa701d5d105dfbf0d2a4bb5ab70fbc0e5158

The branch, ad-parallel-tests has been updated
       via  1b67aa701d5d105dfbf0d2a4bb5ab70fbc0e5158 (commit)
      from  868fb04577daf9c47a4a2bcdd9a92cb78e6cf056 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1b67aa701d5d105dfbf0d2a4bb5ab70fbc0e5158
Author: Ralf Wildenhues <address@hidden>
Date:   Sat Mar 28 21:49:02 2009 +0100

    parallel-tests: warn about $(srcdir), $(top_srcdir) in TESTS.
    
    * automake.in (handle_tests): Warn about portability issue
    concerning generated TESTS files listed with a `$(srcdir)/'
    or `$(top_srcdir)/' prefix.
    * doc/automake.texi (TESTS): Document this issue.  Mention that
    the parallel-tests driver is still experimental.
    * tests/parallel-tests8.test: New test.
    * tests/Makefile.am: Update.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                          |    9 +++
 automake.in                                        |    7 ++
 doc/automake.texi                                  |   15 +++++
 tests/Makefile.am                                  |    1 +
 tests/Makefile.in                                  |    1 +
 .../{parallel-tests5.test => parallel-tests8.test} |   61 +++++++++++---------
 6 files changed, 67 insertions(+), 27 deletions(-)
 copy tests/{parallel-tests5.test => parallel-tests8.test} (52%)

diff --git a/ChangeLog b/ChangeLog
index f063cde..c09a49b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2009-03-28  Ralf Wildenhues  <address@hidden>
 
+       parallel-tests: warn about $(srcdir), $(top_srcdir) in TESTS.
+       * automake.in (handle_tests): Warn about portability issue
+       concerning generated TESTS files listed with a `$(srcdir)/'
+       or `$(top_srcdir)/' prefix.
+       * doc/automake.texi (TESTS): Document this issue.  Mention that
+       the parallel-tests driver is still experimental.
+       * tests/parallel-tests8.test: New test.
+       * tests/Makefile.am: Update.
+
        check-html: Always create HTML output, note conversion failure.
        * lib/am/check.am (check-html): Create `$(TEST_SUITE_HTML)' in
        any case.  Exit unsuccessfully if HTML creation failed.
diff --git a/automake.in b/automake.in
index 433f88e..ce20cce 100755
--- a/automake.in
+++ b/automake.in
@@ -4789,6 +4789,13 @@ sub handle_tests
                return $obj
                  if $val =~ /address@hidden@$/;
                $obj =~ s/\$\(EXEEXT\)$//o;
+
+               if ($val =~ /(\$\((top_)?srcdir\))\//o)
+                 {
+                   msg ('error', $subvar->rdef ($cond)->location,
+                        "parallel-tests: using `$1' in TESTS is currently 
broken: `$val'");
+                 }
+
                foreach my $test_suffix (@test_suffixes)
                  {
                    next
diff --git a/doc/automake.texi b/doc/automake.texi
index d3b72a5..bf41acb 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -8371,6 +8371,7 @@ by the tests, not the tests themselves.  Of course you 
can set
 
 @section Simple tests using @samp{parallel-tests}
 @cindex @option{parallel-tests}, Using
+
 The option @option{parallel-tests} (@pxref{Options}) enables a test
 suite driver that is mostly compatible to the simple test driver
 described above, but provides a few more features and slightly different
@@ -8383,6 +8384,9 @@ for exceptional failures.  Similar to the simple test 
driver,
 the @code{check_*} variables are honored, and the environment variable
 @env{srcdir} is set during test execution.
 
+This test driver is still experimental and may undergo changes in order
+to satisfy additional portability requirements.
+
 @vindex TEST_SUITE_LOG
 @vindex TEST_LOGS
 The driver operates by defining a set of @command{make} rules to create
@@ -8504,6 +8508,17 @@ the inference rules generated by @command{automake} can 
apply.  For
 literal test names, @command{automake} can generate per-target rules
 to avoid this limitation.
 
+Please note that it is currently not possible to use @code{$(srcdir)/}
+or @code{$(top_srcdir)/} in the @code{TESTS} variable.  This technical
+limitation is necessary to avoid generating test logs in the source tree
+and has the unfortunate consequence thast it is not possible to specify
+distributed tests that are themselves generated by means of explicit
+rules, in a way that is portable to all @command{make} implementations
+(@pxref{Make Target Lookup,,, autoconf, The Autoconf Manual}, the
+semantics of FreeBSD and OpenBSD @command{make} conflict with this).
+In case of doubt you may want to require to use GNU @command{make},
+or work around the issue with inference rules to generate the tests.
+
 
 @section DejaGnu Tests
 
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 3f31ca9..daecf34 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -486,6 +486,7 @@ parallel-tests4.test \
 parallel-tests5.test \
 parallel-tests6.test \
 parallel-tests7.test \
+parallel-tests8.test \
 parse.test \
 percent.test \
 percent2.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 7547a2c..92b6031 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -716,6 +716,7 @@ parallel-tests4.test \
 parallel-tests5.test \
 parallel-tests6.test \
 parallel-tests7.test \
+parallel-tests8.test \
 parse.test \
 percent.test \
 percent2.test \
diff --git a/tests/parallel-tests5.test b/tests/parallel-tests8.test
similarity index 52%
copy from tests/parallel-tests5.test
copy to tests/parallel-tests8.test
index f109cc2..309a2cf 100755
--- a/tests/parallel-tests5.test
+++ b/tests/parallel-tests8.test
@@ -15,54 +15,61 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Check parallel-tests features:
-# - concurrent program compilation and testing (with EXTRA_PROGRAMS)
-#
-# Actually, this test doesn't ensure that things happen concurrently.
-# It merely serves as demonstration.  :-)
+# - generated distributed tests.
+# - listing $(srcdir)/ or $(top_srcdir)/ in TESTS doesn't work ATM,
+#   and is thus diagnosed.
+
+# TODO: this test should also ensure that the `make' implementation
+#       properly adheres to rules in all cases.  See the Autoconf
+#       manual for the ugliness in this area, when VPATH comes into
+#       play.  :-/
 
-required=GNUmake
 . ./defs-p || Exit 1
 
 set -e
 
 cat >> configure.in << 'END'
-AC_PROG_CC
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-TESTS = $(programs) $(scripts)
-EXTRA_PROGRAMS = $(programs)
-CLEANFILES = $(EXTRA_PROGRAMS)
-dist_noinst_SCRIPTS = $(scripts)
-programs =
-scripts =
+TESTS = foo.test
+## the next line will cause automake to error out:
+TESTS += $(srcdir)/bar.test $(top_srcdir)/baz.test
+.in.test:
+       cp $< $@
+       chmod +x $@
+check_SCRIPTS = $(TESTS)
+EXTRA_DIST = foo.in foo.test
+DISTCLEANFILES = foo.test
 END
 
-for i in 1 2 3 4 5 6 7 8; do
-  echo "scripts += foo$i.test" >> Makefile.am
-  echo "programs += foo$i.prog" >> Makefile.am
-  cat >foo$i.test <<'END'
+cat >>foo.in <<'END'
 #! /bin/sh
 echo "this is $0"
 exit 0
 END
-  cat >foo$i.c <<'END'
-int main()
-{
-  return 0;
-}
-END
-  chmod a+x foo$i.test
-done
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -a
+AUTOMAKE_fails -a
+grep '(srcdir.*bar' stderr
+grep 'top_srcdir.*baz' stderr
 
-unset TESTS || :
+sed '/srcdir/d' < Makefile.am > t
+mv -f t Makefile.am
+$AUTOMAKE -a
 
 ./configure
-$MAKE -j4 check
+$MAKE check
+$MAKE distcheck
+$MAKE distclean
+
+mkdir build
+cd build
+../configure
+$MAKE check
+test ! -f ../foo.log
 $MAKE distcheck
+
 :


hooks/post-receive
--
GNU Automake




reply via email to

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