Bug 1205687 - Package and include Marionette tests in all-tests.json; r?chmanchester r?gps draft
authorAndreas Tolfsen <ato@mozilla.com>
Thu, 22 Oct 2015 16:22:34 +0100
changeset 324323 6c79aece26f65c74311ed0e79485e1281b2809cf
parent 324322 7104d650a97d895cbbc64d53462bf86a04658abe
child 324324 0ad9ce759589d9bcdc01fa3b7fa0a6a5092cfacb
push id9883
push useratolfsen@mozilla.com
push dateFri, 22 Jan 2016 13:24:29 +0000
reviewerschmanchester, gps
bugs1205687
milestone46.0a1
Bug 1205687 - Package and include Marionette tests in all-tests.json; r?chmanchester r?gps Listing the tests in all-tests.json is prerequisite to adding support for Marionette tests to `./mach test FILE`. Marionette tests will be run from the source directory, as they do not currently need packaging.
python/mozbuild/mozbuild/frontend/context.py
python/mozbuild/mozbuild/frontend/emitter.py
python/mozbuild/mozbuild/testing.py
--- a/python/mozbuild/mozbuild/frontend/context.py
+++ b/python/mozbuild/mozbuild/frontend/context.py
@@ -1440,16 +1440,36 @@ VARIABLES = {
 
         These are commonly named crashtests.list.
         """),
 
     'ANDROID_INSTRUMENTATION_MANIFESTS': (StrictOrderingOnAppendList, list,
         """List of manifest files defining Android instrumentation tests.
         """),
 
+    'MARIONETTE_LAYOUT_MANIFESTS': (StrictOrderingOnAppendList, list,
+        """List of manifest files defining marionette-layout tests.
+        """, None),
+
+    'MARIONETTE_LOOP_MANIFESTS': (StrictOrderingOnAppendList, list,
+        """List of manifest files defining marionette-loop tests.
+        """, None),
+
+    'MARIONETTE_UNIT_MANIFESTS': (StrictOrderingOnAppendList, list,
+        """List of manifest files defining marionette-unit tests.
+        """, None),
+
+    'MARIONETTE_UPDATE_MANIFESTS': (StrictOrderingOnAppendList, list,
+        """List of manifest files defining marionette-update tests.
+        """, None),
+
+    'MARIONETTE_WEBAPI_MANIFESTS': (StrictOrderingOnAppendList, list,
+        """List of manifest files defining marionette-webapi tests.
+        """, None),
+
     'METRO_CHROME_MANIFESTS': (StrictOrderingOnAppendList, list,
         """List of manifest files defining metro browser chrome tests.
         """),
 
     'MOCHITEST_CHROME_MANIFESTS': (StrictOrderingOnAppendList, list,
         """List of manifest files defining mochitest chrome tests.
         """),
 
--- a/python/mozbuild/mozbuild/frontend/emitter.py
+++ b/python/mozbuild/mozbuild/frontend/emitter.py
@@ -1029,17 +1029,16 @@ class TreeMetadataEmitter(LoggingMixin):
                         self._binaries[program].relativedir), context)
                 self._binaries[program] = cls(context, program,
                     is_unit_test=kind == 'CPP_UNIT_TESTS')
                 self._linkage.append((context, self._binaries[program],
                     'HOST_USE_LIBS' if kind == 'HOST_SIMPLE_PROGRAMS'
                     else 'USE_LIBS'))
 
     def _process_test_manifests(self, context):
-
         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 REFTEST_FLAVORS:
             for path in context.get('%s_MANIFESTS' % flavor.upper(), []):
                 for obj in self._process_reftest_manifest(context, flavor, path):
--- a/python/mozbuild/mozbuild/testing.py
+++ b/python/mozbuild/mozbuild/testing.py
@@ -255,16 +255,25 @@ class TestResolver(MozbuildObject):
 #     them into the test package.
 #
 TEST_MANIFESTS = dict(
     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),
+
+    # marionette tests are run from the srcdir
+    # TODO(ato): make packaging work as for other test suites
+    MARIONETTE=('marionette', 'marionette', '.', False),
+    MARIONETTE_LOOP=('marionette', 'marionette', '.', False),
+    MARIONETTE_UNIT=('marionette', 'marionette', '.', False),
+    MARIONETTE_UPDATE=('marionette', 'marionette', '.', False),
+    MARIONETTE_WEBAPI=('marionette', 'marionette', '.', False),
+
     METRO_CHROME=('metro-chrome', 'testing/mochitest', 'metro', True),
     MOCHITEST=('mochitest', 'testing/mochitest', 'tests', True),
     MOCHITEST_CHROME=('chrome', 'testing/mochitest', 'chrome', True),
     MOCHITEST_WEBAPPRT_CONTENT=('webapprt-content', 'testing/mochitest', 'webapprtContent', True),
     MOCHITEST_WEBAPPRT_CHROME=('webapprt-chrome', 'testing/mochitest', 'webapprtChrome', True),
     WEBRTC_SIGNALLING_TEST=('steeplechase', 'steeplechase', '.', True),
     XPCSHELL_TESTS=('xpcshell', 'xpcshell', '.', True),
 )