From f15d31661ef94e5d549dbdfb0f60cea1bc17683a Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Sun, 18 Sep 2011 20:42:56 +0200 Subject: [PATCH] parallel-tests: expose automake bug#9546 * tests/test-driver-is-distributed.test: New test. * tests/Makefile.am (TESTS, XFAIL_TESTS): Add it. --- ChangeLog | 6 +++ tests/Makefile.am | 2 + tests/Makefile.in | 4 +- tests/test-driver-is-distributed.test | 59 +++++++++++++++++++++++++++ 4 files changed, 70 insertions(+), 1 deletion(-) create mode 100755 tests/test-driver-is-distributed.test diff --git a/ChangeLog b/ChangeLog index 8024777cd..856c92f39 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-09-18 Stefano Lattarini + + parallel-tests: expose automake bug#9546 + * tests/test-driver-is-distributed.test: New test. + * tests/Makefile.am (TESTS, XFAIL_TESTS): Add it. + 2011-09-16 Stefano Lattarini automake: remove special handling of `ANSI2KNR' make variable diff --git a/tests/Makefile.am b/tests/Makefile.am index c2b19ca33..2e7e17f1c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -33,6 +33,7 @@ java-nobase.test \ pr8365-remake-timing.test \ yacc-dist-nobuild-subdir.test \ vala-vpath.test \ +test-driver-is-distributed.test \ txinfo5.test @@ -773,6 +774,7 @@ test-driver-create-log-dir.test \ test-driver-strip-vpath.test \ test-driver-trs-suffix-registered.test \ test-driver-fail.test \ +test-driver-is-distributed.test \ test-harness-vpath-rewrite.test \ test-log.test \ test-metadata-global-log.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index f118c8716..82483306c 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -290,7 +290,8 @@ EXTRA_DIST = ChangeLog-old gen-parallel-tests instspc-tests.sh \ XFAIL_TESTS = all.test auxdir2.test cond17.test gcj6.test \ override-conditional-2.test java-nobase.test \ pr8365-remake-timing.test yacc-dist-nobuild-subdir.test \ - vala-vpath.test txinfo5.test $(instspc_xfail_tests) + vala-vpath.test test-driver-is-distributed.test txinfo5.test \ + $(instspc_xfail_tests) parallel_tests = check-concurrency-bug9245-p.test \ check-exported-srcdir-p.test check-fd-redirect-p.test \ check-tests-in-builddir-p.test check-p.test check11-p.test \ @@ -1031,6 +1032,7 @@ test-driver-create-log-dir.test \ test-driver-strip-vpath.test \ test-driver-trs-suffix-registered.test \ test-driver-fail.test \ +test-driver-is-distributed.test \ test-harness-vpath-rewrite.test \ test-log.test \ test-metadata-global-log.test \ diff --git a/tests/test-driver-is-distributed.test b/tests/test-driver-is-distributed.test new file mode 100755 index 000000000..09ea45a86 --- /dev/null +++ b/tests/test-driver-is-distributed.test @@ -0,0 +1,59 @@ +#! /bin/sh +# Copyright (C) 2011 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Check regression of parallel-tests: +# - `test-driver' script not correctly distributed when TESTS is +# defined in a subdir Makefile + +parallel_tests=yes +. ./defs || Exit 1 + +cat >> configure.in << 'END' +AC_CONFIG_FILES([tests/Makefile]) +AC_OUTPUT +END + +mkdir tests + +cat > Makefile.am << 'END' +SUBDIRS = tests +test0: + echo ' ' $(DIST_COMMON) ' ' | grep '[ /]test-driver ' +test1: distdir + ls -l $(distdir) $(distdir)/* ;: For debugging. + test -f $(distdir)/test-driver +.PHONY: test0 test1 +END + +cat > tests/Makefile.am << 'END' +TESTS = foo.test +EXTRA_DIST = $(TESTS) +END + +cat > tests/foo.test << 'END' +#!/bin/sh +exit 0 +END +chmod a+x tests/foo.test + +$ACLOCAL +$AUTOCONF +$AUTOMAKE -a +./configure +$MAKE test0 test1 +$MAKE distcheck + +: -- 2.47.2