comparison tests/run-tests.py @ 34039:72b23c9452d6

run-tests: pass --with-hg to run-tests.py command used by bisect This makes `run-tests.py -l test-run-tests.t` 23 seconds faster on my laptop. Inside the test, `$ rt --known-good-rev=0 test-bisect.t` took 24.9 seconds before, and 1.2 seconds after. Differential Revision: https://phab.mercurial-scm.org/D576
author Jun Wu <quark@fb.com>
date Wed, 02 Aug 2017 21:01:38 -0700
parents 6cc8f848b4c3
children 85bfd6a0bdbf
comparison
equal deleted inserted replaced
34038:bc2535238de2 34039:72b23c9452d6
2078 for test, msg in result.failures: 2078 for test, msg in result.failures:
2079 nooutput(['hg', 'bisect', '--reset']), 2079 nooutput(['hg', 'bisect', '--reset']),
2080 nooutput(['hg', 'bisect', '--bad', '.']) 2080 nooutput(['hg', 'bisect', '--bad', '.'])
2081 nooutput(['hg', 'bisect', '--good', 2081 nooutput(['hg', 'bisect', '--good',
2082 self._runner.options.known_good_rev]) 2082 self._runner.options.known_good_rev])
2083 # TODO: we probably need to forward some options 2083 # TODO: we probably need to forward more options
2084 # that alter hg's behavior inside the tests. 2084 # that alter hg's behavior inside the tests.
2085 rtc = '%s %s %s' % (sys.executable, sys.argv[0], test) 2085 opts = ''
2086 withhg = self._runner.options.with_hg
2087 if withhg:
2088 opts += ' --with-hg=%s ' % shellquote(withhg)
2089 rtc = '%s %s %s %s' % (sys.executable, sys.argv[0], opts,
2090 test)
2086 sub = subprocess.Popen(['hg', 'bisect', '--command', rtc], 2091 sub = subprocess.Popen(['hg', 'bisect', '--command', rtc],
2087 stderr=subprocess.STDOUT, 2092 stderr=subprocess.STDOUT,
2088 stdout=subprocess.PIPE) 2093 stdout=subprocess.PIPE)
2089 data = sub.stdout.read() 2094 data = sub.stdout.read()
2090 sub.wait() 2095 sub.wait()