summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfergus.henderson@gmail.com <fergus.henderson@gmail.com@01de4be4-8c4a-0410-9132-4925637da917>2014-02-27 14:16:56 +0000
committerfergus.henderson@gmail.com <fergus.henderson@gmail.com@01de4be4-8c4a-0410-9132-4925637da917>2014-02-27 14:16:56 +0000
commit0f6ba9b6d4fe98c357a105083948b147ae6e89bc (patch)
tree17c0359a14ea4757e161bc06d1e80d35001fac14
parent414577ee4707bf8b8a20665a330dc4a586aa45be (diff)
downloaddistcc-0f6ba9b6d4fe98c357a105083948b147ae6e89bc.tar.gz
Don't assume that gcc returns exit status 1 for invalid options,
since gcc 4.6.3 (and perhaps earlier) returns exit status 4. Instead, just verify that the exit status from distcc is non-zero and matches what gcc returned. git-svn-id: http://distcc.googlecode.com/svn/trunk@785 01de4be4-8c4a-0410-9132-4925637da917
-rwxr-xr-xtest/testdistcc.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/testdistcc.py b/test/testdistcc.py
index 619cb5e..56216b6 100755
--- a/test/testdistcc.py
+++ b/test/testdistcc.py
@@ -387,9 +387,12 @@ class HelpOption_Case(SimpleDistCC_Case):
class BogusOption_Case(SimpleDistCC_Case):
"""Test handling of --bogus-option.
- Now that we support implicit compilers, this is passed to gcc, which returns 1."""
+ Now that we support implicit compilers, this is passed to gcc,
+ which returns a non-zero status."""
def runtest(self):
- self.runcmd(self.distcc() + _gcc + " --bogus-option", 1)
+ error_rc, _, _ = self.runcmd_unchecked(_gcc + " --bogus-option")
+ assert error_rc != 0
+ self.runcmd(self.distcc() + _gcc + " --bogus-option", error_rc)
self.runcmd(self.distccd() + _gcc + " --bogus-option",
EXIT_BAD_ARGUMENTS)