From patchwork Wed Feb 6 02:35:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2,of,6] run-tests: allow spaces in the --view tool From: Matt Harbison X-Patchwork-Id: 38469 Message-Id: <4bad819762856a2a6b5c.1549420545@Envy> To: mercurial-devel@mercurial-scm.org Date: Tue, 05 Feb 2019 21:35:45 -0500 # HG changeset patch # User Matt Harbison # Date 1549391448 18000 # Tue Feb 05 13:30:48 2019 -0500 # Node ID 4bad819762856a2a6b5c9faeb52a15fa63b1ca9e # Parent e68578660449146a4b77089e8419542a61a3dc1c run-tests: allow spaces in the --view tool Most tools on Windows are in Program Files, and not necessarily on PATH. diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -1902,8 +1902,9 @@ class TestResult(unittest._TextTestResul pass elif self._options.view: v = self._options.view - os.system(r"%s %s %s" % - (v, _strpath(test.refpath), _strpath(test.errpath))) + subprocess.call(r'"%s" "%s" "%s"' % + (v, _strpath(test.refpath), + _strpath(test.errpath)), shell=True) else: servefail, lines = getdiff(expected, got, test.refpath, test.errpath)