Patchwork [053,of,179,tests-refactor] run-tests: add options to runner

login
register
mail settings
Submitter Gregory Szorc
Date May 2, 2014, 6:38 p.m.
Message ID <608bcc158f377ff9a34a.1399055890@vm-ubuntu-main.gateway.sonic.net>
Download mbox | patch
Permalink /patch/4548/
State Superseded
Commit b3399154505f04d9890370622af594c9065c9d58
Headers show

Comments

Gregory Szorc - May 2, 2014, 6:38 p.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1397975339 25200
#      Sat Apr 19 23:28:59 2014 -0700
# Branch stable
# Node ID 608bcc158f377ff9a34af05433b3cc75466ed609
# Parent  9400acbcfb76c42c5b9852da42026b66c976e3ed
run-tests: add options to runner

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -1280,29 +1280,31 @@  testtypes = [('.py', PythonTest, '.out')
              ('.t', TTest, '')]
 
 class TestRunner(object):
     """Holds context for executing tests.
 
     Tests rely on a lot of state. This object holds it for them.
     """
     def __init__(self):
+        self.options = None
         self.testdir = None
         self.hgtmp = None
         self.inst = None
         self.bindir = None
         self.tmpbinddir = None
         self.pythondir = None
         self.coveragefile = None
 
 def main(args, parser=None):
     runner = TestRunner()
 
     parser = parser or getparser()
     (options, args) = parseargs(args, parser)
+    runner.options = options
     os.umask(022)
 
     checktools()
 
     if not args:
         if options.changed:
             proc = Popen4('hg st --rev "%s" -man0 .' % options.changed,
                           None, 0)