Patchwork run-tests: restore quoting the python executable for running *.py tests

login
register
mail settings
Submitter Matt Harbison
Date Oct. 14, 2018, 3:10 a.m.
Message ID <b94bd76195a7474b2493.1539486649@Envy>
Download mbox | patch
Permalink /patch/35945/
State Accepted
Headers show

Comments

Matt Harbison - Oct. 14, 2018, 3:10 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1539486509 14400
#      Sat Oct 13 23:08:29 2018 -0400
# Node ID b94bd76195a7474b2493b362f47550b179d79aa3
# Parent  fb97b23d9256601538396ea49c8284219992fe99
run-tests: restore quoting the python executable for running *.py tests

This was accidentally dropped in 8cf459d8b111.
Yuya Nishihara - Oct. 14, 2018, 4:42 a.m.
On Sat, 13 Oct 2018 23:10:49 -0400, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1539486509 14400
> #      Sat Oct 13 23:08:29 2018 -0400
> # Node ID b94bd76195a7474b2493b362f47550b179d79aa3
> # Parent  fb97b23d9256601538396ea49c8284219992fe99
> run-tests: restore quoting the python executable for running *.py tests

Queued, thanks.

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -1219,7 +1219,8 @@  class PythonTest(Test):
 
     def _run(self, env):
         py3switch = self._py3warnings and b' -3' or b''
-        cmd = b'%s%s "%s"' % (PYTHON, py3switch, self.path)
+        # Quote the python(3) executable for Windows
+        cmd = b'"%s"%s "%s"' % (PYTHON, py3switch, self.path)
         vlog("# Running", cmd)
         normalizenewlines = os.name == 'nt'
         result = self._runcommand(cmd, env,