[PATCH] tests: Ignore the return code of chmod in test-inherit-mode
Javi Merino
cibervicho at gmail.com
Sun Mar 4 16:06:41 CST 2012
# HG changeset patch
# User Javi Merino <cibervicho at gmail.com>
# Date 1330644592 0
# Node ID 95ef24915dc763a7378dd0500975c95be4238aca
# Parent 81a1a00f5738f40250fd6ac7d3dc563ca03bfd34
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.
diff --git a/tests/test-inherit-mode.t b/tests/test-inherit-mode.t
--- a/tests/test-inherit-mode.t
+++ b/tests/test-inherit-mode.t
@@ -138,7 +138,7 @@ just check that directories have the sam
$ 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 || /bin/true
$ mkdir dir
$ touch dir/file
$ hg ci -qAm 'add dir/file'
More information about the Mercurial-devel
mailing list