Bug 1293259 - Write list of master test manifests to a json file in the objdir
MozReview-Commit-ID: DKyhwQjamUA
--- a/python/mozbuild/mozbuild/backend/recursivemake.py
+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
@@ -834,32 +834,37 @@ class RecursiveMakeBackend(CommonBackend
# Detect any Makefile.ins that contain variables on the
# moz.build-only list
self._check_blacklisted_variables(makefile_in, content)
self._fill_root_mk()
# Make the master test manifest files.
+ root_manifests = {}
+ topobjdir = self.environment.topobjdir
for flavor, t in self._test_manifests.items():
install_prefix, manifests = t
- manifest_stem = mozpath.join(install_prefix, '%s.ini' % flavor)
- self._write_master_test_manifest(mozpath.join(
- self.environment.topobjdir, '_tests', manifest_stem),
- manifests)
+ manifest_stem = mozpath.normpath(mozpath.join(install_prefix, '%s.ini' % flavor))
+ master_path = mozpath.join(topobjdir, '_tests', manifest_stem)
+ root_manifests[flavor] = master_path
+ self._write_master_test_manifest(master_path, manifests)
# Catch duplicate inserts.
try:
self._install_manifests['_tests'].add_optional_exists(manifest_stem)
except ValueError:
pass
+ with self._write_file(mozpath.join(topobjdir, 'root-manifests.json')) as fh:
+ fh.write(json.dumps(root_manifests))
+
self._write_manifests('install', self._install_manifests)
- ensureParentDir(mozpath.join(self.environment.topobjdir, 'dist', 'foo'))
+ ensureParentDir(mozpath.join(topobjdir, 'dist', 'foo'))
def _pretty_path_parts(self, path, backend_file):
assert isinstance(path, Path)
if isinstance(path, SourcePath):
if path.full_path.startswith(backend_file.srcdir):
return '$(srcdir)', path.full_path[len(backend_file.srcdir):]
if path.full_path.startswith(backend_file.topsrcdir):
return '$(topsrcdir)', path.full_path[len(backend_file.topsrcdir):]