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 331866 c12838ecfbb51c04eefdf6e92a4dce9f062172d9
parent 331865 d3b5b77d0dccfcbf1dad51296b7f0d4b778520e2
child 331867 de64f009410311eda93f4ac9358f44f1bc327fbe
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1269517
milestone50.0a1
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):