Bug 969585 - Fix installing support files from a manfiest with just disabled tests. r=gps

This commit is contained in:
Ted Mielczarek 2014-02-13 07:46:59 -05:00
parent fd96c04098
commit 9793bc03ab
6 changed files with 23 additions and 1 deletions

View File

@ -502,7 +502,7 @@ class TreeMetadataEmitter(LoggingMixin):
process_support_files(test)
if not m.tests:
if not filtered:
# If there are no tests, look for support-files under DEFAULT.
process_support_files(defaults)

View File

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

View File

@ -0,0 +1,5 @@
[DEFAULT]
support-files = foo.txt
[test_blah.html]
disabled =

View File

@ -316,6 +316,17 @@ class TestEmitterBasic(unittest.TestCase):
paths = sorted([k[len(o.directory)+1:] for k in o.installs.keys()])
self.assertEqual(paths, ["foo.txt", "just-support.ini"])
def test_test_manifest_support_files_disabled_test(self):
"""A test manifest with just disabled tests and support-files is supported."""
reader = self.reader('test-manifest-support-disabled-tests')
objs = self.read_topsrcdir(reader)
self.assertEqual(len(objs), 1)
o = objs[0]
self.assertEqual(len(o.installs), 2)
paths = sorted([k[len(o.directory)+1:] for k in o.installs.keys()])
self.assertEqual(paths, ["foo.txt", "support-disabled-tests.ini"])
def test_test_manifest_keys_extracted(self):
"""Ensure all metadata from test manifests is extracted."""
reader = self.reader('test-manifest-keys-extracted')