changeset 21492:a9c4f4912402

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.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 20 Apr 2014 17:13:10 -0700
parents e9faeb21f954
children b8f4854ea61a
files tests/run-tests.py
diffstat 1 files changed, 4 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- 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: