]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: skip a root-only test when configured without libcap
authorJim Meyering <meyering@redhat.com>
Thu, 2 Oct 2008 13:54:36 +0000 (15:54 +0200)
committerJim Meyering <meyering@redhat.com>
Thu, 2 Oct 2008 13:54:36 +0000 (15:54 +0200)
* tests/ls/capability: Test for HAVE_CAP definition in config.h.

tests/ls/capability

index f064348ef7fea1641b3bc62945044f52da5364fa..6336ca11663cdc26b5e262420438d26ed4eb855d 100755 (executable)
@@ -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