comparison tests/run-tests.py @ 32982: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
comparison
equal deleted inserted replaced
32981:02bca6dc5f41 32982:573baab2a797
1603 'changes)') 1603 'changes)')
1604 else: 1604 else:
1605 self.stream.write('Accept this change? [n] ') 1605 self.stream.write('Accept this change? [n] ')
1606 answer = sys.stdin.readline().strip() 1606 answer = sys.stdin.readline().strip()
1607 if answer.lower() in ('y', 'yes'): 1607 if answer.lower() in ('y', 'yes'):
1608 if test.name.endswith('.t'): 1608 if test.path.endswith(b'.t'):
1609 rename(test.errpath, test.path) 1609 rename(test.errpath, test.path)
1610 else: 1610 else:
1611 rename(test.errpath, '%s.out' % test.path) 1611 rename(test.errpath, '%s.out' % test.path)
1612 accepted = True 1612 accepted = True
1613 if not accepted: 1613 if not accepted: