summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2012-09-02 21:55:07 +0200
committerJim Meyering <meyering@redhat.com>2012-09-05 08:48:28 +0200
commite8f9c131baf50f094228d2181c5ac83e6182be5a (patch)
treed403c919251a3d275950dcd769a29d1f3838ebdb /tests
parent995cd3fa66f484964f9b5f75a2991d92f141a8ba (diff)
downloadcoreutils-e8f9c131baf50f094228d2181c5ac83e6182be5a.tar.xz
tests: use suffix, not exec-bit, to tell which files are tests
* tests/Makefile.am (vc_exe_in_TESTS): Adjust to look, in the 'tests/' subdirectory, for files that have one of the extensions listed in $(TEST_EXTENSIONS), rather than for executable files.
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am18
1 files changed, 10 insertions, 8 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 9e47f28eb..68ea6b49b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -21,18 +21,20 @@
TESTS = $(all_tests)
root_tests = $(all_root_tests)
-# Ensure that all version-controlled executable files are listed
-# in $(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); \
- for f in `$(SHELL) build-aux/vc-list-files $(subdir) \
- | sed 's!^$(subdir)/!!'`; do \
- test -f "tests/$$f" && test -x "tests/$$f" && echo "$$f"; \
- done; \
- } | sort | uniq -u | grep . && exit 1; :
+ $(SHELL) build-aux/vc-list-files $(subdir) \
+ | sed 's!^$(subdir)/!!' | grep -v '^init\.sh$$' \
+ | $(EGREP) "$$test_extensions_rx\$$"; \
+ } | sort | uniq -u | grep . && exit 1; :
check-local: vc_exe_in_TESTS
.PHONY: vc_exe_in_TESTS