Mercurial > public > mercurial-scm > hg-stable
diff tests/run-tests.py @ 33000:573baab2a797
run-tests: fix -i when "#testcases" is used in .t test
The "#testcases" feature introduced by 7340465bd788 has issues with "-i"
because "-i" uses "test.name.endswith('.t')" to test if a test is .t or not.
test.name could now be something like "test-foo.t (caseA)" so the above
endswith test is no longer valid.
This patch changes the test to use "self.path" which won't have the issue.
author | Jun Wu <quark@fb.com> |
---|---|
date | Wed, 21 Jun 2017 01:12:31 -0700 |
parents | 02bca6dc5f41 |
children | fa9a90d5ad89 |
line wrap: on
line diff
--- a/tests/run-tests.py Wed Jun 21 01:12:31 2017 -0700 +++ b/tests/run-tests.py Wed Jun 21 01:12:31 2017 -0700 @@ -1605,7 +1605,7 @@ self.stream.write('Accept this change? [n] ') answer = sys.stdin.readline().strip() if answer.lower() in ('y', 'yes'): - if test.name.endswith('.t'): + if test.path.endswith(b'.t'): rename(test.errpath, test.path) else: rename(test.errpath, '%s.out' % test.path)