зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1476973 - part 2 - assert that XPIDL_SOURCES files all exist; r=gps
We should have been checking for this from the beginning.
This commit is contained in:
Родитель
d886ac50bc
Коммит
61a384e83c
|
@ -1385,6 +1385,10 @@ class TreeMetadataEmitter(LoggingMixin):
|
|||
'{path}: DIST_INSTALL = False has no effect on XPIDL_SOURCES.')
|
||||
|
||||
for idl in context['XPIDL_SOURCES']:
|
||||
if not os.path.exists(idl.full_path):
|
||||
raise SandboxValidationError('File %s from XPIDL_SOURCES '
|
||||
'does not exist' % idl.full_path, context)
|
||||
|
||||
yield XPIDLFile(context, idl, xpidl_module)
|
||||
|
||||
def _process_generated_files(self, context):
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# Any copyright is dedicated to the Public Domain.
|
||||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
XPIDL_MODULE = 'my_module'
|
||||
XPIDL_SOURCES = ['nonexistant.idl']
|
|
@ -1127,6 +1127,13 @@ class TestEmitterBasic(unittest.TestCase):
|
|||
reader = self.reader('xpidl-module-no-sources')
|
||||
self.read_topsrcdir(reader)
|
||||
|
||||
def test_xpidl_module_no_sources(self):
|
||||
"""Missing XPIDL_SOURCES should be rejected."""
|
||||
with self.assertRaisesRegexp(SandboxValidationError, 'File .* '
|
||||
'from XPIDL_SOURCES does not exist'):
|
||||
reader = self.reader('missing-xpidl')
|
||||
self.read_topsrcdir(reader)
|
||||
|
||||
def test_missing_local_includes(self):
|
||||
"""LOCAL_INCLUDES containing non-existent directories should be rejected."""
|
||||
with self.assertRaisesRegexp(SandboxValidationError, 'Path specified in '
|
||||
|
|
Загрузка…
Ссылка в новой задаче