Bug 1269517 - Outfit the configure tests' fake compiler to handle compilation calls. r=glandium
authorChris Manchester <cmanchester@mozilla.com>
Tue, 26 Jul 2016 15:27:19 -0700
changeset 346832 c12838ecfbb51c04eefdf6e92a4dce9f062172d9
parent 346831 d3b5b77d0dccfcbf1dad51296b7f0d4b778520e2
child 346833 de64f009410311eda93f4ac9358f44f1bc327fbe
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1269517
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1269517 - Outfit the configure tests' fake compiler to handle compilation calls. r=glandium MozReview-Commit-ID: 80kwRjHUJb9
python/mozbuild/mozbuild/test/configure/test_toolchain_helpers.py
--- 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):