summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2002-02-04 04:44:14 (GMT)
committerSteven Knight <knight@baldmt.com>2002-02-04 04:44:14 (GMT)
commit52fe7f7c362cacb48f33be6928c27cfc0aa5b5e5 (patch)
tree7f55b7c678210ad4d91953f512e12ea5b1a4801f /etc
parent918d875dbbf44d24ac4c8400b42b804afdb66d89 (diff)
downloadSCons-52fe7f7c362cacb48f33be6928c27cfc0aa5b5e5.zip
SCons-52fe7f7c362cacb48f33be6928c27cfc0aa5b5e5.tar.gz
SCons-52fe7f7c362cacb48f33be6928c27cfc0aa5b5e5.tar.bz2
Make scons return an error code (Anthony Roach)
Diffstat (limited to 'etc')
-rw-r--r--etc/TestSCons.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/etc/TestSCons.py b/etc/TestSCons.py
index 956b454..14c2e0b 100644
--- a/etc/TestSCons.py
+++ b/etc/TestSCons.py
@@ -68,7 +68,7 @@ class TestSCons(TestCmd.TestCmd):
apply(TestCmd.TestCmd.__init__, [self], kw)
os.chdir(self.workdir)
- def run(self, stdout = None, stderr = '', **kw):
+ def run(self, stdout = None, stderr = '', status = 0, **kw):
"""Runs SCons.
This is the same as the base TestCmd.run() method, with
@@ -82,6 +82,10 @@ class TestSCons(TestCmd.TestCmd):
the command. A value of None means
don't test error output.
+ status The expected exit status from the
+ command.
+
+
By default, this does not test standard output (stdout = None),
and expects that error output is empty (stderr = "").
"""
@@ -93,7 +97,7 @@ class TestSCons(TestCmd.TestCmd):
print "STDERR ============"
print self.stderr()
raise
- if self.status:
+ if self.status>>8 != status:
print "%s returned %d" % (self.program, self.status >> 8)
print "STDERR ============"
print self.stderr()