Bug 921987 - Don't install inactive tests; r=ted

This commit is contained in:
Gregory Szorc 2013-10-01 16:31:19 +02:00
parent 1af69ddc75
commit eb23bcadad
6 changed files with 25 additions and 1 deletions

View File

@ -256,7 +256,7 @@ class TreeMetadataEmitter(LoggingMixin):
filtered = m.tests filtered = m.tests
if filter_inactive: if filter_inactive:
filtered = m.active_tests(**self.mozinfo) filtered = m.active_tests(disabled=False, **self.mozinfo)
out_dir = mozpath.join(install_prefix, manifest_reldir) out_dir = mozpath.join(install_prefix, manifest_reldir)

View File

@ -0,0 +1,3 @@
[test_active.html]
[test_inactive.html]
skip-if = true

View File

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

View File

@ -320,6 +320,23 @@ class TestEmitterBasic(unittest.TestCase):
'entry in generated-files not present elsewhere'): 'entry in generated-files not present elsewhere'):
self.read_topsrcdir(reader), self.read_topsrcdir(reader),
# This test is only needed until all harnesses support filtering from
# manifests.
def test_test_manifest_inactive_ignored(self):
"""Inactive tests should not be installed."""
reader = self.reader('test-manifest-inactive-ignored')
objs = [o for o in self.read_topsrcdir(reader)
if isinstance(o, TestManifest)]
self.assertEqual(len(objs), 1)
o = objs[0]
self.assertEqual(o.flavor, 'mochitest')
basenames = set(os.path.basename(k) for k in o.installs.keys())
self.assertEqual(basenames, {'mochitest.ini', 'test_active.html'})
def test_ipdl_sources(self): def test_ipdl_sources(self):
reader = self.reader('ipdl_sources') reader = self.reader('ipdl_sources')
objs = self.read_topsrcdir(reader) objs = self.read_topsrcdir(reader)