From: Stefano Lattarini Date: Wed, 16 Feb 2011 12:46:33 +0000 (+0100) Subject: build: improve the definition of the list of testcases X-Git-Tag: v1.11b~257^2~258 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6b7d31cec24b71073920bda28ec5977bed6b8e46;p=platform%2Fupstream%2Fautomake.git 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. --- diff --git a/ChangeLog b/ChangeLog index 0851b77..028e905 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ 2011-05-01 Stefano Lattarini + 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 + 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. diff --git a/tests/Makefile.am b/tests/Makefile.am index edb516b..12b1c59 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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) diff --git a/tests/Makefile.in b/tests/Makefile.in index 5b1fd31..84a1b72 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -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 diff --git a/tests/gen-parallel-tests b/tests/gen-parallel-tests index d2a5c13..20b9ee1 100755 --- a/tests/gen-parallel-tests +++ b/tests/gen-parallel-tests @@ -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 @@ -22,7 +22,13 @@ 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