run-tests: move test discovery into TestRunner.run()
authorGregory Szorc <gregory.szorc@gmail.com>
Sun, 20 Apr 2014 10:04:15 -0700
changeset 21373 e478a9aab533
parent 21372 3a44787e50e2
child 21374 592b3d2616d7
run-tests: move test discovery into TestRunner.run()
tests/run-tests.py
--- a/tests/run-tests.py	Sun Apr 20 10:03:08 2014 -0700
+++ b/tests/run-tests.py	Sun Apr 20 10:04:15 2014 -0700
@@ -1014,8 +1014,9 @@
         self.abort = [False]
         self._createdfiles = []
 
-    def run(self, tests):
+    def run(self, args):
         """Run the test suite."""
+        tests = self.findtests(args)
         return self._run(tests)
 
     def _run(self, tests):
@@ -1461,9 +1462,7 @@
 
     runner.checktools()
 
-    tests = runner.findtests(args)
-
-    return runner.run(tests)
+    return runner.run(args)
 
 if __name__ == '__main__':
     sys.exit(main(sys.argv[1:]))