зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1446019 - Improve error message for LOCAL_INCLUDES pointing to topobjdir; r=froydnj
The old message is ambiguous as to why it failed. The new one tells you why and hopefully gives you enough info to fix it. MozReview-Commit-ID: 9cBpYLpCFmt --HG-- extra : rebase_source : cf0899e8c5f5330d31c645cba27d1bd3fb19e814
This commit is contained in:
Родитель
13c27bdca7
Коммит
b78a4e45de
|
@ -1135,8 +1135,8 @@ class TreeMetadataEmitter(LoggingMixin):
|
|||
if (full_path == context.config.topsrcdir or
|
||||
full_path == context.config.topobjdir):
|
||||
raise SandboxValidationError('Path specified in LOCAL_INCLUDES '
|
||||
'is not allowed: %s (resolved to %s)' % (local_include,
|
||||
full_path), context)
|
||||
'(%s) resolves to the topsrcdir or topobjdir (%s), which is '
|
||||
'not allowed' % (local_include, full_path), context)
|
||||
include_obj = LocalInclude(context, local_include)
|
||||
local_includes.append(include_obj.path.full_path)
|
||||
yield include_obj
|
||||
|
|
|
@ -1041,14 +1041,16 @@ class TestEmitterBasic(unittest.TestCase):
|
|||
|
||||
with self.assertRaisesRegexp(
|
||||
SandboxValidationError,
|
||||
'Path specified in LOCAL_INCLUDES is not allowed:'):
|
||||
'Path specified in LOCAL_INCLUDES.*resolves to the '
|
||||
'topsrcdir or topobjdir'):
|
||||
objs = self.read_topsrcdir(reader)
|
||||
|
||||
reader = self.reader('local_includes-invalid/objdir')
|
||||
|
||||
with self.assertRaisesRegexp(
|
||||
SandboxValidationError,
|
||||
'Path specified in LOCAL_INCLUDES is not allowed:'):
|
||||
'Path specified in LOCAL_INCLUDES.*resolves to the '
|
||||
'topsrcdir or topobjdir'):
|
||||
objs = self.read_topsrcdir(reader)
|
||||
|
||||
def test_generated_includes(self):
|
||||
|
|
Загрузка…
Ссылка в новой задаче