Backed out changeset 594c44cf5a05 (bug 939080) for breaking buildconfig

--HG--
extra : rebase_source : f526819fa1ad686d9d30f32311c8db037859d178
This commit is contained in:
Gregory Szorc 2013-11-19 11:16:31 -08:00
parent 193f865ba8
commit bfd6140aea
7 changed files with 9 additions and 26 deletions

View File

@ -176,6 +176,9 @@ Files referenced by manifests are automatically installed into the object
directory into paths defined in
:py:func:`mozbuild.frontend.emitter.TreeMetadataEmitter._process_test_manifest`.
Referenced files in the manifest not in the same directory tree as the manifest
file are **not** installed.
.. _reftest_manifests:
Reftest Manifests

View File

@ -444,8 +444,12 @@ class TreeMetadataEmitter(LoggingMixin):
else:
full = mozpath.normpath(mozpath.join(manifest_dir,
pattern))
obj.installs[full] = mozpath.normpath(
mozpath.join(out_dir, pattern))
# Only install paths in our directory. This
# rule is somewhat arbitrary and could be lifted.
if not full.startswith(manifest_dir):
continue
obj.installs[full] = mozpath.join(out_dir, pattern)
# We also copy the manifest into the output directory.
out_path = mozpath.join(out_dir, os.path.basename(manifest_path))

View File

@ -1,4 +0,0 @@
[DEFAULT]
support-files = ../support-file.txt
[test_foo.js]

View File

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

View File

@ -346,22 +346,6 @@ class TestEmitterBasic(unittest.TestCase):
basenames = set(os.path.basename(k) for k in o.installs.keys())
self.assertEqual(basenames, {'mochitest.ini', 'test_active.html'})
def test_test_manifest_parent_support_files_dir(self):
"""support-files referencing a file in a parent directory works."""
reader = self.reader('test-manifest-parent-support-files-dir')
objs = [o for o in self.read_topsrcdir(reader)
if isinstance(o, TestManifest)]
self.assertEqual(len(objs), 1)
o = objs[0]
expected = os.path.join(o.srcdir, 'support-file.txt')
self.assertIn(expected, o.installs)
self.assertEqual(o.installs[expected],
'testing/mochitest/tests/support-file.txt')
def test_ipdl_sources(self):
reader = self.reader('ipdl_sources')
objs = self.read_topsrcdir(reader)