Patchwork D576: run-tests: pass --with-hg to run-tests.py command used by bisect

login
register
mail settings
Submitter phabricator
Date Sept. 1, 2017, 1:57 p.m.
Message ID <d5df66e4dd9b18fb79e00fba902a20b2@localhost.localdomain>
Download mbox | patch
Permalink /patch/23590/
State Not Applicable
Headers show

Comments

phabricator - Sept. 1, 2017, 1:57 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG72b23c9452d6: run-tests: pass --with-hg to run-tests.py command used by bisect (authored by quark).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D576?vs=1463&id=1534

REVISION DETAIL
  https://phab.mercurial-scm.org/D576

AFFECTED FILES
  tests/run-tests.py

CHANGE DETAILS




To: quark, #hg-reviewers, yuja
Cc: yuja, mercurial-devel

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -2080,9 +2080,14 @@ 
                     nooutput(['hg', 'bisect', '--bad', '.'])
                     nooutput(['hg', 'bisect', '--good',
                               self._runner.options.known_good_rev])
-                    # TODO: we probably need to forward some options
+                    # TODO: we probably need to forward more options
                     # that alter hg's behavior inside the tests.
-                    rtc = '%s %s %s' % (sys.executable, sys.argv[0], test)
+                    opts = ''
+                    withhg = self._runner.options.with_hg
+                    if withhg:
+                        opts += ' --with-hg=%s ' % shellquote(withhg)
+                    rtc = '%s %s %s %s' % (sys.executable, sys.argv[0], opts,
+                                           test)
                     sub = subprocess.Popen(['hg', 'bisect', '--command', rtc],
                                            stderr=subprocess.STDOUT,
                                            stdout=subprocess.PIPE)