run-tests: move remaining result processing to Test.run()
authorGregory Szorc <gregory.szorc@gmail.com>
Sat, 19 Apr 2014 20:53:45 -0700
changeset 21327 206814c9072a
parent 21326 04e04766065f
child 21328 9da0761a22a1
run-tests: move remaining result processing to Test.run()
tests/run-tests.py
--- a/tests/run-tests.py	Sat Apr 19 20:52:58 2014 -0700
+++ b/tests/run-tests.py	Sat Apr 19 20:53:45 2014 -0700
@@ -662,6 +662,10 @@
                 msg += 'output changed'
 
             return self.fail(msg, ret)
+        elif ret:
+            return self.fail(describe(ret), ret)
+        else:
+            return self.success()
 
     def _run(self, testtmp, replacements, env):
         raise NotImplemented('Subclasses must implement Test.run()')
@@ -1163,13 +1167,6 @@
             f.write(line)
         f.close()
 
-    if result:
-        pass
-    elif ret:
-        result = t.fail(describe(ret), ret)
-    else:
-        result = t.success()
-
     if not options.verbose:
         iolock.acquire()
         sys.stdout.write(result[0])