Mercurial > hg
comparison tests/run-tests.py @ 32703:9d1d3199382e
run-tests: install hg after computing tests to run
We're going to add a way to list tests, and we don't need to install hg for
that.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Tue, 06 Jun 2017 13:56:53 -0700 |
parents | d0b9c36851f5 |
children | 1270b00a385d |
comparison
equal
deleted
inserted
replaced
32702:d0b9c36851f5 | 32703:9d1d3199382e |
---|---|
2344 if case: | 2344 if case: |
2345 desc['case'] = case | 2345 desc['case'] = case |
2346 return self._gettest(desc, i) | 2346 return self._gettest(desc, i) |
2347 | 2347 |
2348 try: | 2348 try: |
2349 if self._installdir: | |
2350 self._installhg() | |
2351 self._checkhglib("Testing") | |
2352 else: | |
2353 self._usecorrectpython() | |
2354 if self.options.chg: | |
2355 assert self._installdir | |
2356 self._installchg() | |
2357 | |
2358 if self.options.restart: | 2349 if self.options.restart: |
2359 orig = list(testdescs) | 2350 orig = list(testdescs) |
2360 while testdescs: | 2351 while testdescs: |
2361 desc = testdescs[0] | 2352 desc = testdescs[0] |
2362 if 'case' in desc: | 2353 if 'case' in desc: |
2390 tests=tests, loadtest=_reloadtest) | 2381 tests=tests, loadtest=_reloadtest) |
2391 verbosity = 1 | 2382 verbosity = 1 |
2392 if self.options.verbose: | 2383 if self.options.verbose: |
2393 verbosity = 2 | 2384 verbosity = 2 |
2394 runner = TextTestRunner(self, verbosity=verbosity) | 2385 runner = TextTestRunner(self, verbosity=verbosity) |
2386 | |
2387 if self._installdir: | |
2388 self._installhg() | |
2389 self._checkhglib("Testing") | |
2390 else: | |
2391 self._usecorrectpython() | |
2392 if self.options.chg: | |
2393 assert self._installdir | |
2394 self._installchg() | |
2395 | |
2395 result = runner.run(suite) | 2396 result = runner.run(suite) |
2396 | 2397 |
2397 if result.failures: | 2398 if result.failures: |
2398 failed = True | 2399 failed = True |
2399 if result.warned: | 2400 if result.warned: |