Daniel Shahaf wrote on Thu, Sep 09, 2010 at 22:46:16 +0300:
> and while using a patch (attached) to run 'svnadmin setrevprop'
> concurrently to the tests.
Index: subversion/tests/cmdline/svntest/testcase.py
===================================================================
--- subversion/tests/cmdline/svntest/testcase.py	(revision 995432)
+++ subversion/tests/cmdline/svntest/testcase.py	(working copy)
@@ -24,6 +24,7 @@
 ######################################################################
 
 import os, types, sys
+import threading
 
 import svntest
 
@@ -119,6 +120,24 @@
     return self._delegate.results(result)
 
 
+class BackgroundRevpropSetter(threading.Thread):
+  def __init__(self, sandbox):
+    threading.Thread.__init__(self)
+    self.sandbox = sandbox
+    self.goon = True
+
+  def stop(self):
+    self.goon = False
+    self.join()
+
+  def run(self):
+    while self.goon:
+      if self.sandbox.repo_url != svntest.main.pristine_greek_repos_url:
+        # 2001-01-01T01:01:01.010101Z
+        # use 'svnadmin' to avoid having to set hooks
+        sys.stderr.write('repo_dir=%s\n' % self.sandbox.repo_dir)
+        svntest.main.run_svnadmin('setrevprop', '-r0', self.sandbox.repo_dir, 'svn:date', '/tmp/010101');
+
 class FunctionTestCase(TestCase):
   """A TestCase based on a naked Python function object.
 
@@ -167,9 +186,16 @@
     return os.path.splitext(os.path.basename(filename))[0]
 
   def run(self, sandbox):
-    return self.func(sandbox)
+    t = BackgroundRevpropSetter(sandbox)
+    t.start()
+    try:
+      rv = self.func(sandbox)
+      t.stop()
+      return rv
+    except:
+      t.stop()
+      raise
 
-
 class XFail(TestCase):
   """A test that is expected to fail, if its condition is true."""
 
Index: /tmp/010101
===================================================================
--- /dev/null	(revision 0)
+++ /tmp/010101	(not in the working copy)
@@ -0,0 +1 @@
+2001-01-01T01:01:01.010101Z
\ No newline at end of file
Index: subversion/tests/cmdline/basic_tests.py
===================================================================
--- subversion/tests/cmdline/basic_tests.py	(revision 995432)
+++ subversion/tests/cmdline/basic_tests.py	(working copy)
@@ -137,6 +137,7 @@
                                         expected_status,
                                         None,
                                         wc_dir)
+  svntest.main.run_svn(None, 'propget', '--revprop', '-r0', 'svn:date', wc_dir)
 
 
 #----------------------------------------------------------------------

Reply via email to