summaryrefslogtreecommitdiff
path: root/cfg.mk
diff options
context:
space:
mode:
Diffstat (limited to 'cfg.mk')
-rw-r--r--cfg.mk8
1 files changed, 8 insertions, 0 deletions
diff --git a/cfg.mk b/cfg.mk
index c9b8c7af5..bb0960a26 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -519,6 +519,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: