diff options
author | Jim Meyering <meyering@redhat.com> | 2007-12-20 14:19:56 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2007-12-20 14:19:56 +0100 |
commit | 2fc00bda8c6aaab5d0478cc54cf78260090ba74c (patch) | |
tree | 854c042e1d9fe23626f68bb497db1763efb8815c /tests/test-lib.sh | |
parent | 8ddc5056f21039a319a65bece258eccf479e35f8 (diff) | |
download | coreutils-2fc00bda8c6aaab5d0478cc54cf78260090ba74c.tar.xz |
Avoid another "make check" failure due to omitted programs.
* tests/test-lib.sh (require_built_): New function.
* tests/misc/groups-version: Use it to skip this test if
either groups or id is not built.
Diffstat (limited to 'tests/test-lib.sh')
-rw-r--r-- | tests/test-lib.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test-lib.sh b/tests/test-lib.sh index 8872b27b1..a3afba0bf 100644 --- a/tests/test-lib.sh +++ b/tests/test-lib.sh @@ -29,6 +29,19 @@ require_ulimit_() && skip_test_ "this shell lacks ulimit support" } +require_built_() +{ + skip_=no + for i in "$@"; do + case " $built_programs " in + *" $i "*) ;; + *) echo "$i: not built" 1>&2; skip_=yes ;; + esac + done + + test $skip_ = yes && skip_test_ "required program(s) not built" +} + uid_is_privileged_() { # Make sure id -u succeeds. |