[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 15/17] maint: fix syntax checks 'sc_root_tests'
From: |
Stefano Lattarini |
Subject: |
[PATCH 15/17] maint: fix syntax checks 'sc_root_tests' |
Date: |
Sun, 2 Sep 2012 21:55:17 +0200 |
* cfg.mk: Don't work by trying to parse the (now gone) file
'tests/Makefile.am'; rather, look at the contents of the make
variable $(all_root_test). Fix few unrelated cosmetic issues
while at it.
---
cfg.mk | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/cfg.mk b/cfg.mk
index eeb271c..9d36fd2 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -94,21 +94,12 @@ sc_prohibit_jm_in_m4:
# Ensure that each root-requiring test is run via the "check-root" rule.
sc_root_tests:
- @if test -d tests \
- && grep check-root tests/Makefile.am>/dev/null 2>&1; then \
- t1=sc-root.expected; t2=sc-root.actual; \
- grep -nl '^ *require_root_$$' \
- $$($(VC_LIST) tests) |sed s,tests/,, |sort > $$t1; \
- sed -n '/^root_tests =[ ]*\\$$/,/[^\]$$/p' \
- $(srcdir)/tests/Makefile.am \
- | sed 's/^ *//;/^root_tests =/d' \
- | tr -s '\012\\' ' ' | fmt -1 | sort > $$t2; \
- diff -u $$t1 $$t2 || diff=1 || diff=; \
+ @t1=sc-root.expected; t2=sc-root.actual; \
+ grep -nl '^ *require_root_$$' `$(VC_LIST) tests` | sort > $$t1; \
+ for t in $(all_root_tests); do echo $$t; done | sort > $$t2; \
+ st=0; diff -u $$t1 $$t2 || st=1; \
rm -f $$t1 $$t2; \
- test "$$diff" \
- && { echo 'tests/Makefile.am: missing check-root action'>&2; \
- exit 1; } || :; \
- fi
+ exit $$st
# Ensure that all version-controlled test cases are listed in $(all_tests).
sc_tests_list_consistency:
--
1.7.12
- [PATCH 04/17] maint: make vc_exe_in_TESTS also work in VPATH builds, (continued)
- [PATCH 04/17] maint: make vc_exe_in_TESTS also work in VPATH builds, Stefano Lattarini, 2012/09/02
- [PATCH 05/17] tests: use suffix, not exec-bit, to tell which files are tests, Stefano Lattarini, 2012/09/02
- [PATCH 06/17] tests: remove the unused 'root-hint' target, Stefano Lattarini, 2012/09/02
- [PATCH 08/17] maint: remove anachronistic syntax-check, Stefano Lattarini, 2012/09/02
- [PATCH 07/17] maint: remove duplicated declaration of the 'sc_check-AUTHORS' target, Stefano Lattarini, 2012/09/02
- [PATCH 09/17] maint: list of names of built programs available in the Makefiles, Stefano Lattarini, 2012/09/02
- [PATCH 11/17] tests: put test-suite.log back in 'tests/', Stefano Lattarini, 2012/09/02
- [PATCH 12/17] build: remove two now-useless convenience targets, Stefano Lattarini, 2012/09/02
- [PATCH 14/17] maint: avoid a spurious syntax-check error, Stefano Lattarini, 2012/09/02
- [PATCH 13/17] maint: vc_exe_in_TESTS should actually be a syntax check, Stefano Lattarini, 2012/09/02
- [PATCH 15/17] maint: fix syntax checks 'sc_root_tests',
Stefano Lattarini <=
- [PATCH 17/17] maint: fix a spurious syntax-check failure, Stefano Lattarini, 2012/09/02
- [PATCH 16/17] tests: more resilient about tainted absolute srcdir path, Stefano Lattarini, 2012/09/02
- [PATCH 10/17] build: don't use recursive make fore 'tests' subdirectory, Stefano Lattarini, 2012/09/02
- Re: [PATCH 00/17] De-recursion for the 'tests' subdirectory., Jim Meyering, 2012/09/03