You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2015/11/25 17:22:39 UTC

svn commit: r1716464 - /subversion/trunk/build/run_tests.py

Author: philip
Date: Wed Nov 25 16:22:39 2015
New Revision: 1716464

URL: http://svn.apache.org/viewvc?rev=1716464&view=rev
Log:
Make builddir != srcdir work with global scheduler.

* build/run_tests.py
  (CollectingThread.__init__): Add builddir parameter.
  (CollectingThread.run): Find compiled executables in builddir.
  (TestHarness._run_global_sheduler): Pass builddir.

Modified:
    subversion/trunk/build/run_tests.py

Modified: subversion/trunk/build/run_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/build/run_tests.py?rev=1716464&r1=1716463&r2=1716464&view=diff
==============================================================================
--- subversion/trunk/build/run_tests.py (original)
+++ subversion/trunk/build/run_tests.py Wed Nov 25 16:22:39 2015
@@ -340,9 +340,10 @@ class TestHarness:
     jobs objects for them.  in  in  test cases in their own processes.
     Receives test numbers to run from the queue, and saves results into
     the results field.'''
-    def __init__(self, srcdir, testcase):
+    def __init__(self, srcdir, builddir, testcase):
       threading.Thread.__init__(self)
       self.srcdir = srcdir
+      self.builddir = builddir
       self.testcase = testcase
       self.result = []
 
@@ -371,10 +372,12 @@ class TestHarness:
 
       progdir, progbase, test_nums = self.testcase
 
-      progabs = os.path.abspath(os.path.join(self.srcdir, progdir, progbase))
       if progbase[-3:] == '.py':
+        progabs = os.path.abspath(os.path.join(self.srcdir, progdir, progbase))
         self._count_py_tests(progabs, progdir, progbase)
       else:
+        progabs = os.path.abspath(os.path.join(self.builddir, progdir,
+                                               progbase))
         self._count_c_tests(progabs, progdir, progbase)
 
     def get_result(self):
@@ -412,7 +415,8 @@ class TestHarness:
     # mask latency.  This takes .5s instead of about 3s.
     threads = [ ]
     for count, testcase in enumerate(testlist):
-      threads.append(self.CollectingThread(self.srcdir, testcase))
+      threads.append(self.CollectingThread(self.srcdir, self.builddir,
+                                           testcase))
 
     for t in threads:
       t.start()