summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-vcs/bzr/files/bzr-0.90-tests-fix_root.patch')
-rw-r--r--dev-vcs/bzr/files/bzr-0.90-tests-fix_root.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/dev-vcs/bzr/files/bzr-0.90-tests-fix_root.patch b/dev-vcs/bzr/files/bzr-0.90-tests-fix_root.patch
new file mode 100644
index 000000000000..03f95b33da3e
--- /dev/null
+++ b/dev-vcs/bzr/files/bzr-0.90-tests-fix_root.patch
@@ -0,0 +1,30 @@
+--- bzrlib/tests/test_lockdir.py 2007-08-28 22:51:01.000000000 +0300
++++ bzrlib/tests/test_lockdir.py 2007-08-31 15:54:46.000000000 +0300
+@@ -594,6 +594,8 @@
+ def test_lock_permission(self):
+ if not osutils.supports_posix_readonly():
+ raise tests.TestSkipped('Cannot induce a permission failure')
++ if not os.getuid():
++ raise tests.TestSkipped('Running as root')
+ ld1 = self.get_lock()
+ lock_path = ld1.transport.local_abspath('test_lock')
+ os.mkdir(lock_path)
+--- bzrlib/tests/per_lock/test_lock.py 2007-08-28 22:51:00.000000000 +0300
++++ bzrlib/tests/per_lock/test_lock.py 2007-08-31 16:34:22.000000000 +0300
+@@ -22,6 +22,7 @@
+ )
+
+ from bzrlib.tests.per_lock import TestCaseWithLock
++from bzrlib.tests import TestSkipped
+
+
+ class TestLock(TestCaseWithLock):
+@@ -62,6 +63,8 @@
+
+ But we shouldn't be able to take a write lock.
+ """
++ if not osutils.os.getuid():
++ raise TestSkipped('Running as root')
+ osutils.make_readonly('a-file')
+ # Make sure the file is read-only (on all platforms)
+ self.assertRaises(IOError, open, 'a-file', 'rb+')