You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2018/09/28 15:41:57 UTC

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

Author: danielsh
Date: Fri Sep 28 15:41:56 2018
New Revision: 1842260

URL: http://svn.apache.org/viewvc?rev=1842260&view=rev
Log:
Fix a bug in 'make check GLOBAL_SCHEDULER=1'.

* build/run_tests.py
  (TestHarness.Job._command_line, TestHarness.CollectingThread._count_py_tests):
    Use sys.executable.
  (TestHarness._run_global_scheduler): Ask a question.

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=1842260&r1=1842259&r2=1842260&view=diff
==============================================================================
--- subversion/trunk/build/run_tests.py (original)
+++ subversion/trunk/build/run_tests.py Fri Sep 28 15:41:56 2018
@@ -327,7 +327,7 @@ class TestHarness:
     def _command_line(self, harness):
       if self.is_python:
         cmdline = list(harness.py_test_cmdline)
-        cmdline.insert(0, 'python')
+        cmdline.insert(0, sys.executable)
         cmdline.insert(1, self.progabs)
         # Run the test apps in "child process" mode,
         # i.e. w/o cleaning up global directories etc.
@@ -375,7 +375,7 @@ class TestHarness:
 
     def _count_py_tests(self, progabs, progdir, progbase):
       'Run a c test, escaping parameters as required.'
-      cmdline = [ 'python', progabs, '--list' ]
+      cmdline = [ sys.executable, progabs, '--list' ]
       prog = subprocess.Popen(cmdline, stdout=subprocess.PIPE, cwd=progdir)
       lines = prog.stdout.readlines()
 
@@ -448,6 +448,7 @@ class TestHarness:
     job_queue = queue.Queue()
     total_count = 0
     scrambled = list(jobs)
+    # TODO: What's this line doing, and what's the magic number?
     scrambled.sort(key=lambda x: ("1" if x.test_count() < 30 else "0") + str(x.number))
     for job in scrambled:
       total_count += job.test_count()