build: improve the definition of the list of testcases
authorStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 16 Feb 2011 12:46:33 +0000 (13:46 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 1 May 2011 15:25:59 +0000 (17:25 +0200)
* tests/Makefile.am (handwritten_tests): New variable.
(generated_tests): Likewise.
(TESTS): Redefine as the union of the above.
(EXTRA_DIST): Extend using $(handwritten_tests) and
$(generated_tests) rather than $(TESTS).
* tests/gen-parallel-tests: Update accordingly, and
make more robust.

ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/gen-parallel-tests

index 0851b77..028e905 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2011-05-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+       build: improve the definition of the list of testcases
+       * tests/Makefile.am (handwritten_tests): New variable.
+       (generated_tests): Likewise.
+       (TESTS): Redefine as the union of the above.
+       (EXTRA_DIST): Extend using $(handwritten_tests) and
+       $(generated_tests) rather than $(TESTS).
+       * tests/gen-parallel-tests: Update accordingly, and
+       make more robust.
+
+2011-05-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
        tests skips: shorter and clearer messages
        * tests/defs: Use shorter messages when giving reasons for test
        skipping; it turns out these shorter messages are also clearer.
index edb516b..12b1c59 100644 (file)
@@ -110,7 +110,13 @@ AM_TESTS_ENVIRONMENT = \
   test x"$$original_ACLOCAL" = x || unset original_ACLOCAL; \
   exec 9>&2; stderr_fileno_=9; export stderr_fileno_;
 
-TESTS = \
+TESTS = $(handwritten_tests) $(generated_tests)
+
+EXTRA_DIST += $(handwritten_tests) $(generated_tests)
+
+generated_tests = $(parallel_tests) $(instspc_tests)
+
+handwritten_tests = \
 aclocal.test \
 aclocal3.test \
 aclocal4.test \
@@ -529,7 +535,6 @@ instmany.test \
 instmany-mans.test \
 instmany-python.test \
 instspc-data.test \
-$(instspc_tests) \
 interp.test \
 interp2.test \
 java.test \
@@ -1043,11 +1048,7 @@ yflags-conditional.test \
 yflags-d-false-positives.test \
 yflags-force-override.test \
 yflags-force-conditional.test \
-yflags-var-expand.test \
-$(parallel_tests)
-
-EXTRA_DIST += $(TESTS)
-
+yflags-var-expand.test
 
 # Each test case depends on defs, aclocal, and automake.
 $(TEST_LOGS): defs aclocal-$(APIVERSION) automake-$(APIVERSION)
index 5b1fd31..84a1b72 100644 (file)
@@ -286,7 +286,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 MAINTAINERCLEANFILES = $(parallel_tests) $(instspc_tests)
 EXTRA_DIST = ChangeLog-old gen-parallel-tests instspc-tests.sh \
-       $(TESTS)
+       $(handwritten_tests) $(generated_tests)
 XFAIL_TESTS = all.test auxdir2.test cond17.test gcj6.test \
        override-conditional-2.test pr8365-remake-timing.test \
        yacc-dist-nobuild-subdir.test txinfo5.test \
@@ -375,7 +375,9 @@ AM_TESTS_ENVIRONMENT = \
   test x"$$original_ACLOCAL" = x || unset original_ACLOCAL; \
   exec 9>&2; stderr_fileno_=9; export stderr_fileno_;
 
-TESTS = \
+TESTS = $(handwritten_tests) $(generated_tests)
+generated_tests = $(parallel_tests) $(instspc_tests)
+handwritten_tests = \
 aclocal.test \
 aclocal3.test \
 aclocal4.test \
@@ -794,7 +796,6 @@ instmany.test \
 instmany-mans.test \
 instmany-python.test \
 instspc-data.test \
-$(instspc_tests) \
 interp.test \
 interp2.test \
 java.test \
@@ -1308,8 +1309,7 @@ yflags-conditional.test \
 yflags-d-false-positives.test \
 yflags-force-override.test \
 yflags-force-conditional.test \
-yflags-var-expand.test \
-$(parallel_tests)
+yflags-var-expand.test
 
 all: all-am
 
index d2a5c13..20b9ee1 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Generate parallel-tests.am.
 #
-# Copyright (C) 2009, 2010  Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 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
 
 set -e
 
-tests=`sed -n '/^TESTS =/,/^$/s/\(.*\.test\).*/\1/p' Makefile.am`
+tests=`sed -n '/^handwritten_tests =/,/^$/s/\(.*\.test\).*/\1/p' Makefile.am`
+
+if test -z "$tests"; then
+  echo "$0: failed to obtain list of tests" >&2
+  exit 1
+fi
+
 {
   grep -l '^TESTS ' $tests
   grep -l ' TESTS ' $tests