summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfergus.henderson <fergushenderson@users.noreply.github.com>2014-02-27 14:16:56 +0000
committerfergus.henderson <fergushenderson@users.noreply.github.com>2014-02-27 14:16:56 +0000
commitbacff9e2db115c244b813fe897fdbb88f0ab7e89 (patch)
tree17c0359a14ea4757e161bc06d1e80d35001fac14
parent44e89fc437dee4f9b8da44bf5980fbcffee02889 (diff)
downloaddistcc-git-bacff9e2db115c244b813fe897fdbb88f0ab7e89.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.
-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)