maint: vc_exe_in_TESTS should actually be a syntax check
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 2 Sep 2012 19:55:15 +0000 (21:55 +0200)
committerJim Meyering <meyering@redhat.com>
Wed, 5 Sep 2012 06:48:29 +0000 (08:48 +0200)
Because it requires the presence of the '.git' directory, that is,
can be run only for maintainers working from checked-out sources.

* tests/local.mk (vc_exe_in_TESTS): Rename and move ...
* cfg.mk (sc_tests_list_consistency): ... here, with minor adjustments.

cfg.mk
tests/local.mk

diff --git a/cfg.mk b/cfg.mk
index 68fe82f..888bc38 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -111,6 +111,19 @@ sc_root_tests:
               exit 1; } || :;                                          \
        fi
 
+# Ensure that all version-controlled test cases are listed in $(all_tests).
+sc_tests_list_consistency:
+       @bs="\\";                                                       \
+       test_extensions_rx=`echo $(TEST_EXTENSIONS)                     \
+         | sed -e "s/ /|/g" -e "s/$$bs./$$bs$$bs./g"`;                 \
+       {                                                               \
+         for t in $(all_tests); do echo $$t; done;                     \
+         cd $(top_srcdir);                                             \
+         $(SHELL) build-aux/vc-list-files tests                        \
+           | grep -v '^tests/init\.sh$$'                               \
+           | $(EGREP) "$$test_extensions_rx\$$";                       \
+       } | sort | uniq -u | grep . && exit 1; :
+
 # Create a list of regular expressions matching the names
 # of files included from system.h.  Exclude a couple.
 .re-list:
index f00abed..b129475 100644 (file)
@@ -23,24 +23,6 @@ root_tests = $(all_root_tests)
 
 EXTRA_DIST += $(all_tests)
 
-# Ensure that each version-controlled file in 'tests/' with a suffix
-# specified in $(TEST_EXTENSIONS) is listed in $(all_tests).
-vc_exe_in_TESTS:
-       $(AM_V_GEN)test -d $(top_srcdir)/.git || exit 1;                \
-       bs="\\";                                                        \
-       test_extensions_rx=`echo $(TEST_EXTENSIONS)                     \
-         | sed -e "s/ /|/g" -e "s/$$bs./$$bs$$bs./g"`;                 \
-       {                                                               \
-         for t in $(all_tests); do echo $$t; done;                     \
-         cd $(top_srcdir);                                             \
-         $(SHELL) build-aux/vc-list-files $(subdir)                    \
-           | grep -v '^tests/init\.sh$$'                               \
-           | $(EGREP) "$$test_extensions_rx\$$";                       \
-       } | sort | uniq -u | grep . && exit 1; :
-
-check-local: vc_exe_in_TESTS
-.PHONY: vc_exe_in_TESTS
-
 TEST_EXTENSIONS = .sh .pl .xpl
 
 if HAVE_PERL