aboutsummaryrefslogtreecommitdiff
path: root/tests/chgrp.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/chgrp.test')
-rwxr-xr-xtests/chgrp.test10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/chgrp.test b/tests/chgrp.test
index 65820361..5c7e4258 100755
--- a/tests/chgrp.test
+++ b/tests/chgrp.test
@@ -9,9 +9,13 @@ then
exit
fi
-# We chgrp between "root" and the last group in /etc/group.
-
-GRP="$(sed -n '$s/:.*//p' /etc/group)"
+if [ -f /etc/group ]; then
+ # We chgrp between "root" and the last group in /etc/group.
+ GRP="$(sed -n '$s/:.*//p' /etc/group)"
+else
+ # Or assume we're on Android and pick a well-known group.
+ GRP=shell
+fi
# Set up a little testing hierarchy