# HG changeset patch # User Gregory Szorc # Date 1397966648 25200 # Node ID 3f79bacbf80bcfab07568dde64c53ea9f54d6abe # Parent 8ead79ffbc402539354ad45bda4b2e3c4392ea16 run-tests: move retesting result to Test.run() diff -r 8ead79ffbc40 -r 3f79bacbf80b tests/run-tests.py --- 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()