Bug 1269517 - Outfit the configure tests' fake compiler to handle compilation calls. r=glandium
MozReview-Commit-ID: 80kwRjHUJb9
--- a/python/mozbuild/mozbuild/test/configure/test_toolchain_helpers.py
+++ b/python/mozbuild/mozbuild/test/configure/test_toolchain_helpers.py
@@ -185,16 +185,20 @@ class FakeCompiler(dict):
apply_defn(defn)
for flag in flags:
apply_defn(self.get(flag, {}))
pp.out = StringIO()
pp.do_include(file)
return 0, pp.out.getvalue(), ''
+ elif '-c' in flags:
+ if '-funknown-flag' in flags:
+ return 1, '', ''
+ return 0, '', ''
return 1, '', ''
def __add__(self, other):
return FakeCompiler(self, other)
class TestFakeCompiler(unittest.TestCase):