]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: skip the groups-dash test when "groups" is not built
authorJim Meyering <meyering@redhat.com>
Thu, 12 Mar 2009 13:40:45 +0000 (14:40 +0100)
committerJim Meyering <meyering@redhat.com>
Thu, 12 Mar 2009 18:48:21 +0000 (19:48 +0100)
* tests/misc/groups-dash: Skip if groups is not being installed.
Suggested by Mike Frysinger.
Also fail if groups exits with nonzero status.

tests/misc/groups-dash

index 01a507df1c75ed043b46a5d2b2b8d5ac6b3df87c..b2cb3bc45bf851cc66a10919033e8a292e221abd 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # ensure groups handles -- sanely
 
-# Copyright (C) 2007-2008 Free Software Foundation, Inc.
+# Copyright (C) 2007-2009 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,13 +22,14 @@ if test "$VERBOSE" = yes; then
 fi
 
 . $srcdir/test-lib.sh
+require_built_ groups
 
 # Coreutils 6.9 and earlier failed to display information on first argument
 # if later argument was --.
 fail=0
-groups none -- > out 2>&1
+groups none -- > out 2>&1 && fail=1
 echo $? >> out
-groups -- none -- > exp 2>&1
+groups -- none -- > exp 2>&1 && fail=1
 echo $? >> exp
 
 compare out exp || fail=1