diff options
author | Jim Meyering <meyering@redhat.com> | 2011-05-13 18:57:31 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-05-13 18:57:31 +0200 |
commit | 76f49e601eb630d9f3d7c34676f38a5083f318fc (patch) | |
tree | 457747c4134c0379128e60e89e75e45b98270816 | |
parent | 89d542f3d8fc97b3f9c45ad5beee9afdb68da152 (diff) | |
download | coreutils-76f49e601eb630d9f3d7c34676f38a5083f318fc.tar.xz |
maint: add new syntax-check rule to prohibit use of skip_
* cfg.mk (sc_prohibit_skip_): New rule.
* tests/init.cfg (skip_test_): Add a comment.
-rw-r--r-- | cfg.mk | 6 | ||||
-rw-r--r-- | tests/init.cfg | 3 |
2 files changed, 9 insertions, 0 deletions
@@ -221,6 +221,12 @@ sc_prohibit_emacs__indent_tabs_mode__setting: halt='use of emacs indent-tabs-mode: setting' \ $(_sc_search_regexp) +# Use skip_test_ rather than init.sh's "skip_" function. +sc_prohibit_skip_: + @prohibit=' skip[_] ' \ + halt="use init.cfg's skip_test_, not init.sh's skip_" \ + $(_sc_search_regexp) + # Ensure that each file that contains fail=1 also contains fail=0. # Otherwise, setting file=1 in the environment would make tests fail # unexpectedly. diff --git a/tests/init.cfg b/tests/init.cfg index 55d757175..3a59bbd6b 100644 --- a/tests/init.cfg +++ b/tests/init.cfg @@ -34,6 +34,9 @@ sanitize_path_() export PATH } +# Use this function rather than init.sh's skip_. +# The "skip_" function emits its diagnostic only to one stream. +# This one emits it both to the tty and to the log file. skip_test_() { echo "$0: skipping test: $@" | head -1 1>&9 |