diff options
author | Jim Meyering <meyering@redhat.com> | 2009-10-29 14:40:40 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-10-29 16:51:07 +0100 |
commit | 39da66f979c206946e5593dbd432e88905a9e383 (patch) | |
tree | ab796006220074433a99f012d6a67f3b759b6768 /cfg.mk | |
parent | 22776f84cba4102306a36cd06ea4c54282432423 (diff) | |
download | coreutils-39da66f979c206946e5593dbd432e88905a9e383.tar.xz |
tests: don't let a fail=1 env. setting induce unwarranted test failure
* cfg.mk (sc_fail_is_initialized): New rule.
Fix the offenders:
* tests/cp/acl: Set fail=0
* tests/cp/backup-is-src: Likewise.
* tests/cp/file-perm-race: Likewise.
* tests/cp/reflink-auto: Likewise.
* tests/cp/same-file: Likewise.
* tests/ln/backup-1: Likewise.
* tests/misc/su-fail: Likewise.
* tests/misc/truncate-owned-by-other: Likewise.
* tests/mkdir/p-3: Likewise.
* tests/mkdir/selinux: Likewise.
* tests/mkdir/special-1: Likewise.
* tests/mv/acl: Likewise.
* tests/mv/backup-is-src: Likewise.
* tests/mv/diag: Likewise.
* tests/mv/force: Likewise.
* tests/mv/hard-link-1: Likewise.
* tests/mv/into-self-3: Likewise.
* tests/mv/sticky-to-xpart: Likewise.
* tests/touch/now-owned-by-other: Likewise.
Diffstat (limited to 'cfg.mk')
-rw-r--r-- | cfg.mk | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -230,4 +230,15 @@ sc_prohibit_emacs__indent_tabs_mode__setting: msg='use of emacs indent-tabs-mode: setting' \ $(_prohibit_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. +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 + include $(srcdir)/dist-check.mk |