diff options
Diffstat (limited to 'build/run_tests.py')
-rwxr-xr-x | build/run_tests.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/build/run_tests.py b/build/run_tests.py index b311d9f..163c984 100755 --- a/build/run_tests.py +++ b/build/run_tests.py @@ -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() |