1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-02-14 03:12:10 +02:00

tests: prohibit fail=0 initialization

* cfg.mk (sc_prohibit_fail_0): New rule.
* .x-sc_prohibit_fail_0: New file.
* Makefile.am (syntax_check_exceptions): Distribute the new file.
This commit is contained in:
Jim Meyering
2009-10-30 11:09:50 +01:00
parent 3c88587b2e
commit 71c2f88155
3 changed files with 8 additions and 8 deletions

3
.x-sc_prohibit_fail_0 Normal file
View File

@@ -0,0 +1,3 @@
\.mk$
/Makefile\.am$
^tests/test-lib\.sh$

View File

@@ -47,6 +47,7 @@ syntax_check_exceptions = \
.x-sc_po_check \
.x-sc_program_name \
.x-sc_prohibit_atoi_atof \
.x-sc_prohibit_fail_0 \
.x-sc_prohibit_magic_number_exit \
.x-sc_prohibit_stat_st_blocks \
.x-sc_prohibit_strcmp \

12
cfg.mk
View File

@@ -232,13 +232,9 @@ sc_prohibit_emacs__indent_tabs_mode__setting:
# Ensure that each file that contains fail=1 also contains fail=0.
# Otherwise, setting file=1 in the environment would make tests fail unexpectedly.
sc_fail_is_initialized:
@files=$$(grep -l -E '\<fail=1$$' $$($(VC_LIST_EXCEPT))); \
if test "$$?" = 0; then \
grep -LE '\<fail=0$$' $$files | grep . && \
{ echo '$(ME): the above files do not set fail=0' \
1>&2; exit 1; } || :; \
else :; \
fi
sc_prohibit_fail_0:
@re='\<fail=0\>' \
msg='fail=0 initialization' \
$(_prohibit_regexp)
include $(srcdir)/dist-check.mk