tests: skip a root-only test when configured without libcap

* tests/ls/capability: Test for HAVE_CAP definition in config.h.
This commit is contained in:
Jim Meyering 2008-10-02 15:54:36 +02:00
parent ef13885b37
commit 7eb15e1020

View File

@ -24,6 +24,9 @@ fi
. $srcdir/test-lib.sh
require_root_
grep '^#define HAVE_CAP 1$' $CONFIG_HEADER > /dev/null \
|| skip_test_ "configured without libcap support"
(setcap --help) 2>&1 |grep 'usage: setcap' > /dev/null \
|| skip_test_ "setcap utility not found"
fail=0