Author: rhuijben
Date: Mon Feb 23 12:27:47 2015
New Revision: 1661654
URL: http://svn.apache.org/r1661654
Log:
Use a few sandbox helper functions, to make a test that currently only works
on posix systems also work on non posix systems.
This has the 'nice side effect' of showing that the problem is not
symlink related.
* subversion/tests/cmdline/special_tests.py
(update_obstructing_symlink): Remove non posix skip. Use link
helpers to get same test running on all platforms.
* subversion/tests/cmdline/svntest/sandbox.py
(simple_symlink): New function, extracted from...
(simple_add_symlink): ... this, which is now a caller.
Modified:
subversion/trunk/subversion/tests/cmdline/special_tests.py
subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py
Modified: subversion/trunk/subversion/tests/cmdline/special_tests.py
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/special_tests.py?rev=1661654&r1=1661653&r2=1661654&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/special_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/special_tests.py Mon Feb 23
12:27:47 2015
@@ -612,7 +612,6 @@ def replace_symlink_with_dir(sbox):
# test for issue #1808: svn up deletes local symlink that obstructs
# versioned file
@Issue(1808)
-@SkipUnless(svntest.main.is_posix_os)
def update_obstructing_symlink(sbox):
"symlink obstructs incoming delete"
@@ -624,7 +623,7 @@ def update_obstructing_symlink(sbox):
# delete A/mu and replace it with a symlink
svntest.main.run_svn(None, 'rm', mu_path)
- os.symlink(iota_path, mu_path)
+ sbox.simple_add_symlink(iota_path, 'mu')
svntest.main.run_svn(None, 'rm', mu_url,
'-m', 'log msg')
@@ -633,10 +632,12 @@ def update_obstructing_symlink(sbox):
'up', wc_dir)
# check that the symlink is still there
- target = os.readlink(mu_path)
- if target != iota_path:
- raise svntest.Failure
-
+ if not os.path.exists(mu_path):
+ raise svntest.Failure("mu should be there")
+ if svntest.main.is_posix_os():
+ target = os.readlink(mu_path)
+ if target != iota_path:
+ raise svntest.Failure("mu no longer points to the same location")
def warn_on_reserved_name(sbox):
"warn when attempt operation on a reserved name"
Modified: subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py?rev=1661654&r1=1661653&r2=1661654&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py Mon Feb 23
12:27:47 2015
@@ -381,15 +381,18 @@ class Sandbox:
raise Exception("Unexpected line '" + line + "' in proplist output" +
str(out))
return props
- def simple_add_symlink(self, dest, target):
- """Create a symlink TARGET pointing to DEST and add it to subversion"""
+ def simple_symlink(self, dest, target):
+ """Create a symlink TARGET pointing to DEST"""
if svntest.main.is_posix_os():
os.symlink(dest, self.ospath(target))
else:
svntest.main.file_write(self.ospath(target), "link %s" % dest)
+
+ def simple_add_symlink(self, dest, target, add=True):
+ """Create a symlink TARGET pointing to DEST and add it to subversion"""
+ self.simple_symlink(dest, target)
self.simple_add(target)
- if not svntest.main.is_posix_os():
- # '*' is evaluated on Windows
+ if not svntest.main.is_posix_os(): # '*' is evaluated on Windows
self.simple_propset('svn:special', 'X', target)
def simple_add_text(self, text, *targets):