From: stevenknight Date: Tue, 16 Jul 2002 22:55:27 +0000 (+0000) Subject: Add a separate options argument for running SCons via the test infrastructure. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9ced82f97f2756692cc5bad7757dd0850ec57251;p=scons.git Add a separate options argument for running SCons via the test infrastructure. git-svn-id: http://scons.tigris.org/svn/scons/trunk@417 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/etc/TestSCons.py b/etc/TestSCons.py index 92001c3b..1caef4f7 100644 --- a/etc/TestSCons.py +++ b/etc/TestSCons.py @@ -90,7 +90,8 @@ class TestSCons(TestCmd.TestCmd): apply(TestCmd.TestCmd.__init__, [self], kw) os.chdir(self.workdir) - def run(self, stdout = None, stderr = '', status = 0, **kw): + def run(self, options = None, arguments = None, + stdout = None, stderr = '', status = 0, **kw): """Runs SCons. This is the same as the base TestCmd.run() method, with @@ -110,6 +111,9 @@ class TestSCons(TestCmd.TestCmd): By default, this does not test standard output (stdout = None), and expects that error output is empty (stderr = ""). """ + if options: + arguments = options + " " + arguments + kw['arguments'] = arguments try: apply(TestCmd.TestCmd.run, [self], kw) except: @@ -147,10 +151,12 @@ class TestSCons(TestCmd.TestCmd): print self.stderr() raise TestFailed - def up_to_date(self, arguments = None, **kw): - kw['arguments'] = arguments + def up_to_date(self, options = None, arguments = None, **kw): s = "" for arg in string.split(arguments): s = s + 'scons: "%s" is up to date.\n' % arg + if options: + arguments = options + " " + arguments + kw['arguments'] = arguments kw['stdout'] = s apply(self.run, [], kw)