Bug 884587 - Part 2: Add EXPORTS files to purge manifest; r=glandium
☠☠ backed out by 301c184ae8e7 ☠ ☠
authorGregory Szorc <gps@mozilla.com>
Tue, 25 Jun 2013 11:04:06 -0700
changeset 148728 0244a34bc4190998441c143140451598fe941c66
parent 148727 796961a384b47798de261e2c9c6b331f39144f1c
child 148729 3ccbd6d8354e1ed9e987cd1113abd83fc99613c2
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs884587
milestone25.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 884587 - Part 2: Add EXPORTS files to purge manifest; r=glandium
python/mozbuild/mozbuild/backend/recursivemake.py
python/mozbuild/mozbuild/test/backend/test_recursivemake.py
--- a/python/mozbuild/mozbuild/backend/recursivemake.py
+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
@@ -318,16 +318,20 @@ class RecursiveMakeBackend(BuildBackend)
         else:
             export_name = 'EXPORTS'
 
         # Iterate over the list of export filenames, printing out an EXPORTS
         # declaration for each.
         if strings:
             backend_file.write('%s += %s\n' % (export_name, ' '.join(strings)))
 
+            for s in strings:
+                p = '%s%s' % (namespace, s)
+                self._purge_manifests['dist_include'].add(p)
+
         children = exports.get_children()
         for subdir in sorted(children):
             self._process_exports(children[subdir], backend_file,
                                   namespace=namespace + subdir)
 
     def _process_program(self, program, backend_file):
         backend_file.write('PROGRAM = %s\n' % program)
 
--- a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
+++ b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
@@ -226,16 +226,23 @@ class TestRecursiveMakeBackend(BackendTe
             'EXPORTS_NAMESPACES += mozilla/dom',
             'EXPORTS_mozilla/dom += dom1.h dom2.h',
             'EXPORTS_NAMESPACES += mozilla/gfx',
             'EXPORTS_mozilla/gfx += gfx.h',
             'EXPORTS_NAMESPACES += nspr/private',
             'EXPORTS_nspr/private += pprio.h',
         ])
 
+        # EXPORTS files should appear in the dist_include purge manifest.
+        m = PurgeManifest.from_path(os.path.join(env.topobjdir,
+            '_build_manifests', 'purge', 'dist_include'))
+        self.assertIn('foo.h', m.entries)
+        self.assertIn('mozilla/mozilla1.h', m.entries)
+        self.assertIn('mozilla/dom/dom2.h', m.entries)
+
     def test_xpcshell_manifests(self):
         """Ensure XPCSHELL_TESTS_MANIFESTS is written out correctly."""
         env = self._consume('xpcshell_manifests', RecursiveMakeBackend)
 
         backend_path = os.path.join(env.topobjdir, 'backend.mk')
         lines = [l.strip() for l in open(backend_path, 'rt').readlines()[2:]]
 
         # Avoid positional parameter and async related breakage