# HG changeset patch # User Gregory Szorc # Date 1398039190 25200 # Node ID a9c4f491240247711792dc3016d53083cd702deb # Parent e9faeb21f954dff16e6adbf8611052d9699b2a32 run-tests: eliminate Test._result The result of test execution is now reported on a TestResult. We no longer need to store a tuple of the result. diff -r e9faeb21f954 -r a9c4f4912402 tests/run-tests.py --- a/tests/run-tests.py Sun Apr 20 17:10:49 2014 -0700 +++ b/tests/run-tests.py Sun Apr 20 17:13:10 2014 -0700 @@ -356,7 +356,6 @@ self._ret = None self._out = None self._duration = None - self._result = None self._skipped = None self._testtmp = None @@ -395,7 +394,6 @@ self._ret = None self._out = None self._duration = None - self._result = None self._skipped = None self._testtmp = os.path.join(self._threadtmp, @@ -521,13 +519,12 @@ missing = ['irrelevant'] if failed: - self._result = self.fail('hg have failed checking for %s' % - failed[-1], ret) + self.fail('hg have failed checking for %s' % failed[-1], ret) else: self._skipped = True raise SkipTest(missing[-1]) elif ret == 'timeout': - self._result = self.fail('timed out', ret) + self.fail('timed out', ret) elif out != self._refout: info = {} if not options.nodiff: @@ -554,13 +551,9 @@ f.write(line) f.close() - self._result = self.fail(msg, ret) + self.fail(msg, ret) elif ret: - self._result = self.fail(describe(ret), ret) - else: - self._result = self.success() - - return self._result + self.fail(describe(ret), ret) def tearDown(self): """Tasks to perform after run().""" @@ -658,9 +651,6 @@ hgrc.write('[%s]\n%s\n' % (section, key)) hgrc.close() - def success(self): - return '.', self.name, '' - def fail(self, msg, ret): warned = ret is False if not self._options.nodiff: