Mercurial > hg-stable
changeset 21330:3f79bacbf80b
run-tests: move retesting result to Test.run()
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 19 Apr 2014 21:04:08 -0700 |
parents | 8ead79ffbc40 |
children | bfe929a4b45b |
files | tests/run-tests.py |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/run-tests.py Sat Apr 19 21:02:51 2014 -0700 +++ b/tests/run-tests.py Sat Apr 19 21:04:08 2014 -0700 @@ -592,6 +592,9 @@ result.skipped = True return self.skip('blacklisted') + if options.retest and not os.path.exists('%s.err' % self._test): + return self.ignore('not retesting') + # Remove any previous output files. if os.path.exists(self._errpath): os.remove(self._errpath) @@ -763,6 +766,9 @@ return 's', self._test, msg + def ignore(self, msg): + return 'i', self._test, msg + class TestResult(object): """Holds the result of a test execution.""" @@ -1115,17 +1121,11 @@ log("\nSkipping %s: %s" % (testpath, msg)) return 's', test, msg - def ignore(msg): - return 'i', test, msg - testpath = os.path.join(TESTDIR, test) err = os.path.join(TESTDIR, test + ".err") lctest = test.lower() if not (options.whitelisted and test in options.whitelisted): - if options.retest and not os.path.exists(test + ".err"): - return ignore("not retesting") - if options.keywords: fp = open(test) t = fp.read().lower() + test.lower()