Bug 1371065: Follow-up: Fix emitter sandbox validation bustage. r=me CLOSED TREE
authorKris Maglione <maglione.k@gmail.com>
Tue, 12 Sep 2017 12:42:11 -0700
changeset 663391 2d0d78a70953c589f5c62f527f7f95881492d3a6
parent 663390 453483778b6e1f09d3fddd9b89beb42abfaac200
child 663392 9e7cdda04cbfc5d4dae19e071498d3351923196e
push id79424
push userbmo:tchiovoloni@mozilla.com
push dateTue, 12 Sep 2017 23:17:54 +0000
reviewersme
bugs1371065
milestone57.0a1
Bug 1371065: Follow-up: Fix emitter sandbox validation bustage. r=me CLOSED TREE MozReview-Commit-ID: 8XK9HuAgtD0
python/mozbuild/mozbuild/frontend/emitter.py
--- a/python/mozbuild/mozbuild/frontend/emitter.py
+++ b/python/mozbuild/mozbuild/frontend/emitter.py
@@ -1251,16 +1251,22 @@ class TreeMetadataEmitter(LoggingMixin):
             obj = TestManifest(context, path, mpmanifest, flavor=flavor,
                 install_prefix=install_prefix,
                 relpath=mozpath.join(manifest_reldir, mozpath.basename(path)),
                 sources=manifest_sources,
                 dupe_manifest='dupe-manifest' in defaults)
 
             filtered = mpmanifest.tests
 
+            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:
                 # This is terrible, but what are you going to do?
                 out_dir = mozpath.join(out_dir, defaults['install-to-subdir'])
                 obj.manifest_obj_relpath = mozpath.join(manifest_reldir,
                                                         defaults['install-to-subdir'],
                                                         mozpath.basename(path))