tests: ignore the return code of chmod in test-inherit-mode stable
authorJavi Merino <cibervicho@gmail.com>
Thu, 01 Mar 2012 23:29:52 +0000
branchstable
changeset 16225 7cf8de5a82d8
parent 16220 939f043ab5ed
child 16226 674ecd23c42c
tests: ignore the return code of chmod in test-inherit-mode In freebsd, a newly created directory has the same group as the parent directory by default. That means that the test directory created by test-inherit-mode.t is owned by root's group, so "chmod g+s .hg/store" fails to set the SGID bit and returns 1. If we ignore chmod's return code, the testsuite passes again.
tests/test-inherit-mode.t
--- a/tests/test-inherit-mode.t	Sat Mar 03 23:14:31 2012 -0600
+++ b/tests/test-inherit-mode.t	Thu Mar 01 23:29:52 2012 +0000
@@ -138,7 +138,7 @@
   $ hg init setgid
   $ cd setgid
   $ chmod g+rwx .hg/store
-  $ chmod g+s .hg/store 2> /dev/null
+  $ chmod g+s .hg/store 2> /dev/null || true
   $ mkdir dir
   $ touch dir/file
   $ hg ci -qAm 'add dir/file'