Mercurial > hg
comparison tests/run-tests.py @ 21332:60ce874f5b06
run-tests: move test name filter to Test.run()
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 19 Apr 2014 21:08:03 -0700 |
parents | bfe929a4b45b |
children | 9a5913beaf77 |
comparison
equal
deleted
inserted
replaced
21331:bfe929a4b45b | 21332:60ce874f5b06 |
---|---|
603 if k in t: | 603 if k in t: |
604 break | 604 break |
605 else: | 605 else: |
606 return self.ignore("doesn't match keyword") | 606 return self.ignore("doesn't match keyword") |
607 | 607 |
608 if not os.path.basename(self._test.lower()).startswith('test-'): | |
609 return self.skip('not a test file') | |
610 | |
608 # Remove any previous output files. | 611 # Remove any previous output files. |
609 if os.path.exists(self._errpath): | 612 if os.path.exists(self._errpath): |
610 os.remove(self._errpath) | 613 os.remove(self._errpath) |
611 | 614 |
612 testtmp = os.path.join(self._threadtmp, os.path.basename(self._path)) | 615 testtmp = os.path.join(self._threadtmp, os.path.basename(self._path)) |
1133 | 1136 |
1134 testpath = os.path.join(TESTDIR, test) | 1137 testpath = os.path.join(TESTDIR, test) |
1135 err = os.path.join(TESTDIR, test + ".err") | 1138 err = os.path.join(TESTDIR, test + ".err") |
1136 lctest = test.lower() | 1139 lctest = test.lower() |
1137 | 1140 |
1138 if not os.path.basename(lctest).startswith("test-"): | |
1139 return skip("not a test file") | |
1140 for ext, cls, out in testtypes: | 1141 for ext, cls, out in testtypes: |
1141 if lctest.endswith(ext): | 1142 if lctest.endswith(ext): |
1142 runner = cls | 1143 runner = cls |
1143 ref = os.path.join(TESTDIR, test + out) | 1144 ref = os.path.join(TESTDIR, test + out) |
1144 break | 1145 break |