Patchwork [4,of,8] tests: decode bytes path to hg command before hitting with shellquote

login
register
mail settings
Submitter Augie Fackler
Date Sept. 19, 2017, 4:35 a.m.
Message ID <6922a7d8b86c3cc0ecaa.1505795721@augie-macbookpro2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/24010/
State Accepted
Headers show

Comments

Augie Fackler - Sept. 19, 2017, 4:35 a.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1505794092 14400
#      Tue Sep 19 00:08:12 2017 -0400
# Node ID 6922a7d8b86c3cc0ecaad1e39ab98a1760fdbe6a
# Parent  55bb22a17fe82cb743d63f5a662a475333b85060
tests: decode bytes path to hg command before hitting with shellquote

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -2104,7 +2104,7 @@  class TextTestRunner(unittest.TextTestRu
                     opts = ''
                     withhg = self._runner.options.with_hg
                     if withhg:
-                        opts += ' --with-hg=%s ' % shellquote(withhg)
+                        opts += ' --with-hg=%s ' % shellquote(_strpath(withhg))
                     rtc = '%s %s %s %s' % (sys.executable, sys.argv[0], opts,
                                            test)
                     sub = subprocess.Popen(bisectcmd + ['--command', rtc],