Bug 1074507 - Avoid pre-filtering tests so we can have e10s-only tests. r=ted
authorMark Hammond <mhammond@skippinet.com.au>
Wed, 01 Oct 2014 17:06:00 -0400
changeset 209161 33b673fb5f993d18009f638f4ba13e8fe2f51c74
parent 209160 9e7dff9e44045775d6e852d4d249346dc2290aa9
child 209162 58012cbee5b65b729e12de2a860671b5dd18c8ed
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersted
bugs1074507
milestone35.0a1
Bug 1074507 - Avoid pre-filtering tests so we can have e10s-only tests. r=ted
python/mozbuild/mozbuild/frontend/emitter.py
--- a/python/mozbuild/mozbuild/frontend/emitter.py
+++ b/python/mozbuild/mozbuild/frontend/emitter.py
@@ -745,42 +745,37 @@ class TreeMetadataEmitter(LoggingMixin):
         # While there are multiple test manifests, the behavior is very similar
         # across them. We enforce this by having common handling of all
         # manifests and outputting a single class type with the differences
         # described inside the instance.
         #
         # Keys are variable prefixes and values are tuples describing how these
         # manifests should be handled:
         #
-        #    (flavor, install_prefix, active, package_tests)
+        #    (flavor, install_prefix, package_tests)
         #
         # flavor identifies the flavor of this test.
         # install_prefix is the path prefix of where to install the files in
         #     the tests directory.
-        # active indicates whether to filter out inactive tests from the
-        #     manifest.
         # package_tests indicates whether to package test files into the test
         #     package; suites that compile the test files should not install
         #     them into the test package.
         #
-        # We ideally don't filter out inactive tests. However, not every test
-        # harness can yet deal with test filtering. Once all harnesses can do
-        # this, this feature can be dropped.
         test_manifests = dict(
-            A11Y=('a11y', 'testing/mochitest', 'a11y', True, True),
-            BROWSER_CHROME=('browser-chrome', 'testing/mochitest', 'browser', True, True),
-            ANDROID_INSTRUMENTATION=('instrumentation', 'instrumentation', '.', False, False),
-            JETPACK_PACKAGE=('jetpack-package', 'testing/mochitest', 'jetpack-package', True, True),
-            JETPACK_ADDON=('jetpack-addon', 'testing/mochitest', 'jetpack-addon', True, False),
-            METRO_CHROME=('metro-chrome', 'testing/mochitest', 'metro', True, True),
-            MOCHITEST=('mochitest', 'testing/mochitest', 'tests', True, True),
-            MOCHITEST_CHROME=('chrome', 'testing/mochitest', 'chrome', True, True),
-            MOCHITEST_WEBAPPRT_CHROME=('webapprt-chrome', 'testing/mochitest', 'webapprtChrome', True, True),
-            WEBRTC_SIGNALLING_TEST=('steeplechase', 'steeplechase', '.', True, True),
-            XPCSHELL_TESTS=('xpcshell', 'xpcshell', '.', False, True),
+            A11Y=('a11y', 'testing/mochitest', 'a11y', True),
+            BROWSER_CHROME=('browser-chrome', 'testing/mochitest', 'browser', True),
+            ANDROID_INSTRUMENTATION=('instrumentation', 'instrumentation', '.', False),
+            JETPACK_PACKAGE=('jetpack-package', 'testing/mochitest', 'jetpack-package', True),
+            JETPACK_ADDON=('jetpack-addon', 'testing/mochitest', 'jetpack-addon', False),
+            METRO_CHROME=('metro-chrome', 'testing/mochitest', 'metro', True),
+            MOCHITEST=('mochitest', 'testing/mochitest', 'tests', True),
+            MOCHITEST_CHROME=('chrome', 'testing/mochitest', 'chrome', True),
+            MOCHITEST_WEBAPPRT_CHROME=('webapprt-chrome', 'testing/mochitest', 'webapprtChrome', True),
+            WEBRTC_SIGNALLING_TEST=('steeplechase', 'steeplechase', '.', True),
+            XPCSHELL_TESTS=('xpcshell', 'xpcshell', '.', True),
         )
 
         for prefix, info in test_manifests.items():
             for path in context.get('%s_MANIFESTS' % prefix, []):
                 for obj in self._process_test_manifest(context, info, path):
                     yield obj
 
         for flavor in ('crashtest', 'reftest'):
@@ -822,17 +817,17 @@ class TreeMetadataEmitter(LoggingMixin):
         sub = cls(context)
         sub.input_path = mozpath.join(context.srcdir, '%s.in' % path)
         sub.output_path = mozpath.join(context.objdir, path)
         sub.relpath = path
 
         return sub
 
     def _process_test_manifest(self, context, info, manifest_path):
-        flavor, install_root, install_subdir, filter_inactive, package_tests = info
+        flavor, install_root, install_subdir, package_tests = info
 
         manifest_path = mozpath.normpath(manifest_path)
         path = mozpath.normpath(mozpath.join(context.srcdir, manifest_path))
         manifest_dir = mozpath.dirname(path)
         manifest_reldir = mozpath.dirname(mozpath.relpath(path,
             context.config.topsrcdir))
         install_prefix = mozpath.join(install_root, install_subdir)
 
@@ -845,22 +840,16 @@ class TreeMetadataEmitter(LoggingMixin):
 
             obj = TestManifest(context, path, m, flavor=flavor,
                 install_prefix=install_prefix,
                 relpath=mozpath.join(manifest_reldir, mozpath.basename(path)),
                 dupe_manifest='dupe-manifest' in defaults)
 
             filtered = m.tests
 
-            if filter_inactive:
-                # We return tests that don't exist because we want manifests
-                # defining tests that don't exist to result in error.
-                filtered = m.active_tests(exists=False, disabled=True,
-                    **self.info)
-
             # Jetpack add-on tests are expected to be generated during the
             # build process so they won't exist here.
             if flavor != 'jetpack-addon':
                 missing = [t['name'] for t in filtered if not os.path.exists(t['path'])]
                 if missing:
                     raise SandboxValidationError('Test manifest (%s) lists '
                         'test that does not exist: %s' % (
                         path, ', '.join(missing)), context)