Patchwork [082,of,179,tests-refactor] run-tests: eliminate main()

login
register
mail settings
Submitter Gregory Szorc
Date May 2, 2014, 6:38 p.m.
Message ID <37bec1483bd54a4f5ada.1399055919@vm-ubuntu-main.gateway.sonic.net>
Download mbox | patch
Permalink /patch/4577/
State Accepted
Commit 71081f7f9e52d71bd153879e60c842731503d907
Headers show

Comments

Gregory Szorc - May 2, 2014, 6:38 p.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1398013763 25200
#      Sun Apr 20 10:09:23 2014 -0700
# Branch stable
# Node ID 37bec1483bd54a4f5ada00494ca2f462559a34dc
# Parent  07c0013cf11e4c4f938a541792a4543a55e3fa48
run-tests: eliminate main()

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -1460,15 +1460,11 @@  class TestRunner(object):
             if os.name == 'nt' and not p.endswith('.exe'):
                 p += '.exe'
             found = self._findprogram(p)
             if found:
                 vlog("# Found prerequisite", p, "at", found)
             else:
                 print "WARNING: Did not find prerequisite tool: %s " % p
 
-def main(args, runner=None, parser=None):
-    runner = runner or TestRunner()
-
-    return runner.run(args, parser=parser)
-
 if __name__ == '__main__':
-    sys.exit(main(sys.argv[1:]))
+    runner = TestRunner()
+    sys.exit(runner.run(sys.argv[1:]))