Bug 882859 - Part a: Introduce FAIL_ON_WARNINGS into moz.build; r=gps

This commit is contained in:
Ms2ger 2013-08-22 08:55:58 +02:00
parent ec08decbf0
commit 79ecb04f81
7 changed files with 16 additions and 1 deletions

View File

@ -200,7 +200,9 @@ class RecursiveMakeBackend(CommonBackend):
if isinstance(v, list):
for item in v:
backend_file.write('%s += %s\n' % (k, item))
elif isinstance(v, bool):
if v:
backend_file.write('%s := 1\n' % k)
else:
backend_file.write('%s := %s\n' % (k, v))
elif isinstance(obj, Exports):

View File

@ -122,6 +122,7 @@ class TreeMetadataEmitter(LoggingMixin):
EXTRA_JS_MODULES='EXTRA_JS_MODULES',
EXTRA_PP_COMPONENTS='EXTRA_PP_COMPONENTS',
EXTRA_PP_JS_MODULES='EXTRA_PP_JS_MODULES',
FAIL_ON_WARNINGS='FAIL_ON_WARNINGS',
GTEST_CMMSRCS='GTEST_CMM_SOURCES',
GTEST_CPPSRCS='GTEST_CPP_SOURCES',
GTEST_CSRCS='GTEST_C_SOURCES',

View File

@ -134,6 +134,10 @@ VARIABLES = {
exist. These generally have .cpp extensions.
"""),
'FAIL_ON_WARNINGS': (bool, bool, False,
"""Whether to treat warnings as errors.
"""),
'GTEST_C_SOURCES': (StrictOrderingOnAppendList, list, [],
"""C code source files for GTest unit tests.

View File

@ -39,3 +39,5 @@ CSRCS += ['bar.c', 'foo.c']
CMMSRCS = ['bar.mm', 'foo.mm']
SSRCS = ['bar.S', 'foo.S']
FAIL_ON_WARNINGS = True

View File

@ -175,6 +175,9 @@ class TestRecursiveMakeBackend(BackendTester):
'EXTRA_PP_JS_MODULES += bar.pp.jsm',
'EXTRA_PP_JS_MODULES += foo.pp.jsm',
],
'FAIL_ON_WARNINGS': [
'FAIL_ON_WARNINGS := 1',
],
'GTEST_CMMSRCS': [
'GTEST_CMMSRCS += test1.mm',
'GTEST_CMMSRCS += test2.mm',

View File

@ -40,4 +40,6 @@ CMMSRCS = ['fans.mm', 'tans.mm']
SSRCS = ['fans.S', 'tans.S']
FAIL_ON_WARNINGS = True
NO_DIST_INSTALL = True

View File

@ -136,6 +136,7 @@ class TestEmitterBasic(unittest.TestCase):
EXTRA_PP_COMPONENTS=['fans.pp.js', 'tans.pp.js'],
EXTRA_JS_MODULES=['bar.jsm', 'foo.jsm'],
EXTRA_PP_JS_MODULES=['bar.pp.jsm', 'foo.pp.jsm'],
FAIL_ON_WARNINGS=True,
GTEST_CSRCS=['test1.c', 'test2.c'],
GTEST_CMMSRCS=['test1.mm', 'test2.mm'],
GTEST_CPPSRCS=['test1.cpp', 'test2.cpp'],