From 1c2adf628d15657cee31f82525493bd9ab84b369 Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Tue, 16 Jul 2002 22:55:27 +0000 Subject: Add a separate options argument for running SCons via the test infrastructure. --- etc/TestSCons.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/etc/TestSCons.py b/etc/TestSCons.py index 92001c3..1caef4f 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) -- cgit v0.12