diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-09-02 21:55:17 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2012-09-05 08:48:29 +0200 |
commit | 9e6d411e262b3dd2fd7f1d6709fba9bbaac3c255 (patch) | |
tree | de7a47b140c13458e69d8f175c39567c89ab4e19 | |
parent | 212eff25751c90d308bafe1c7982608c6b3156df (diff) | |
download | coreutils-9e6d411e262b3dd2fd7f1d6709fba9bbaac3c255.tar.xz |
maint: fix syntax checks 'sc_root_tests'
* cfg.mk: Don't work by trying to parse the (now gone) file
'tests/Makefile.am'; rather, use the contents of the make variable,
$(all_root_tests), introduced few commits ago.
Fix a few unrelated cosmetic issues while at it.
-rw-r--r-- | cfg.mk | 19 |
1 files changed, 5 insertions, 14 deletions
@@ -95,21 +95,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: |