mirror of
https://https.git.savannah.gnu.org/git/findutils.git
synced 2026-01-26 15:39:06 +00:00
maint: add sc_prohibit_or_fail syntax-check
The shell tests should use `cmd ... || fail=1` for detecting errors. Add a syntax-check to ensure they don't use `cmd ... || fail` which is a noop. * cfg.mk (sc_prohibit_or_fail): Add syntax-check, borrowed from coreutils.
This commit is contained in:
parent
10635bb14a
commit
7d226e6a45
8
cfg.mk
8
cfg.mk
@ -171,6 +171,14 @@ sc_prohibit_and_fail_1:
|
||||
in_vc_files='^tests/' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Ensure that tests don't use `cmd ... || fail` as that's a noop.
|
||||
sc_prohibit_or_fail:
|
||||
@prohibit='\|\| fail$$' \
|
||||
exclude=':#' \
|
||||
halt='|| fail detected. Please use: || fail=1' \
|
||||
in_vc_files='^tests/' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Ensure that env vars are not passed through returns_ as
|
||||
# that was seen to fail on FreeBSD /bin/sh at least
|
||||
sc_prohibit_env_returns:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user