From patchwork Fri Sep 1 13:57:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D577: run-tests: extract prefix of bisect commands to a variable From: phabricator X-Patchwork-Id: 23591 Message-Id: <03c7e4b3bebc4579c55193684e4f3292@localhost.localdomain> To: mercurial-devel@mercurial-scm.org Date: Fri, 1 Sep 2017 13:57:53 +0000 This revision was automatically updated to reflect the committed changes. Closed by commit rHG85bfd6a0bdbf: run-tests: extract prefix of bisect commands to a variable (authored by quark). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D577?vs=1464&id=1535 REVISION DETAIL https://phab.mercurial-scm.org/D577 AFFECTED FILES tests/run-tests.py CHANGE DETAILS To: quark, #hg-reviewers Cc: mercurial-devel diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -2070,15 +2070,16 @@ savetimes(self._runner._outputdir, result) if failed and self._runner.options.known_good_rev: + bisectcmd = ['hg', 'bisect'] def nooutput(args): p = subprocess.Popen(args, stderr=subprocess.STDOUT, stdout=subprocess.PIPE) p.stdout.read() p.wait() for test, msg in result.failures: - nooutput(['hg', 'bisect', '--reset']), - nooutput(['hg', 'bisect', '--bad', '.']) - nooutput(['hg', 'bisect', '--good', + nooutput(bisectcmd + ['--reset']), + nooutput(bisectcmd + ['--bad', '.']) + nooutput(bisectcmd + ['--good', self._runner.options.known_good_rev]) # TODO: we probably need to forward more options # that alter hg's behavior inside the tests. @@ -2088,7 +2089,7 @@ 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], + sub = subprocess.Popen(bisectcmd + ['--command', rtc], stderr=subprocess.STDOUT, stdout=subprocess.PIPE) data = sub.stdout.read()