# HG changeset patch # User Gregory Szorc # Date 2014-04-20 03:35:54 # Node ID 512968bfb00aac10d65de401ede7242e41423ea6 # Parent d06b09dc80a55d46e20e01da6ed7fcf81443d30e run-tests: move success() into Test diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -675,6 +675,9 @@ class Test(object): return env + def success(self): + return '.', self._test, '' + class TestResult(object): """Holds the result of a test execution.""" @@ -1049,9 +1052,6 @@ def runone(options, test, count): return '.', test, '' return warned and '~' or '!', test, msg - def success(): - return '.', test, '' - def ignore(msg): return 'i', test, msg @@ -1099,7 +1099,6 @@ def runone(options, test, count): t = runner(test, testpath, options, count, ref, err) res = TestResult() t.run(res) - t.cleanup() if res.exception: return fail('Exception during execution: %s' % res.exception, 255) @@ -1154,7 +1153,7 @@ def runone(options, test, count): elif ret: result = fail(describe(ret), ret) else: - result = success() + result = t.success() if not options.verbose: iolock.acquire() @@ -1162,6 +1161,8 @@ def runone(options, test, count): sys.stdout.flush() iolock.release() + t.cleanup() + return result _hgpath = None