Bug 1069569 - Complain about missing test files for all suites. r=mshal

--HG--
extra : rebase_source : 55d571b413d6080f8fdb1e56b419c078d66f31e7
This commit is contained in:
Nick Alexander 2014-09-19 11:19:37 -07:00
parent be11177c7d
commit c78265ca7e
6 changed files with 21 additions and 5 deletions

View File

@ -850,11 +850,11 @@ class TreeMetadataEmitter(LoggingMixin):
filtered = m.active_tests(exists=False, disabled=True,
**self.info)
missing = [t['name'] for t in filtered if not os.path.exists(t['path'])]
if missing:
raise SandboxValidationError('Test manifest (%s) lists '
'test that does not exist: %s' % (
path, ', '.join(missing)), context)
missing = [t['name'] for t in filtered if not os.path.exists(t['path'])]
if missing:
raise SandboxValidationError('Test manifest (%s) lists '
'test that does not exist: %s' % (
path, ', '.join(missing)), context)
out_dir = mozpath.join(install_prefix, manifest_reldir)
if 'install-to-subdir' in defaults:

View File

@ -0,0 +1,4 @@
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
XPCSHELL_TESTS_MANIFESTS += ['xpcshell.ini']

View File

@ -0,0 +1,4 @@
[DEFAULT]
support-files = support/**
[missing.js]

View File

@ -501,6 +501,14 @@ class TestEmitterBasic(unittest.TestCase):
'lists test that does not exist: test_missing.html'):
self.read_topsrcdir(reader)
def test_test_manifest_missing_test_error_unfiltered(self):
"""Missing test files should result in error, even when the test list is not filtered."""
reader = self.reader('test-manifest-missing-test-file-unfiltered')
with self.assertRaisesRegexp(SandboxValidationError,
'lists test that does not exist: missing.js'):
self.read_topsrcdir(reader)
def test_ipdl_sources(self):
reader = self.reader('ipdl_sources')
objs = self.read_topsrcdir(reader)