Bug 1205687 - Add Mn test flavour and include tests in build manifests; r?jgraham draft
authorAndreas Tolfsen <ato@mozilla.com>
Fri, 18 Sep 2015 14:53:37 +0100
changeset 324324 0ad9ce759589d9bcdc01fa3b7fa0a6a5092cfacb
parent 324323 6c79aece26f65c74311ed0e79485e1281b2809cf
child 324325 7d636d0643f967009a0565cf9e31f4572661f468
push id9883
push useratolfsen@mozilla.com
push dateFri, 22 Jan 2016 13:24:29 +0000
reviewersjgraham
bugs1205687
milestone46.0a1
Bug 1205687 - Add Mn test flavour and include tests in build manifests; r?jgraham
testing/mach_commands.py
testing/marionette/client/marionette/tests/webapi-tests.ini
testing/marionette/mach_commands.py
testing/marionette/moz.build
--- a/testing/mach_commands.py
+++ b/testing/mach_commands.py
@@ -128,45 +128,48 @@ TEST_FLAVORS = {
     'a11y': {
         'mach_command': 'mochitest',
         'kwargs': {'flavor': 'a11y', 'test_paths': []},
     },
     'browser-chrome': {
         'mach_command': 'mochitest',
         'kwargs': {'flavor': 'browser-chrome', 'test_paths': []},
     },
-    'chrashtest': { },
+    'crashtest': {},
     'chrome': {
         'mach_command': 'mochitest',
         'kwargs': {'flavor': 'chrome', 'test_paths': []},
     },
+    'marionette': {
+        'mach_command': 'marionette-test',
+        'kwargs': {'tests': []},
+    },
     'mochitest': {
         'mach_command': 'mochitest',
         'kwargs': {'flavor': 'mochitest', 'test_paths': []},
     },
     'reftest': {
         'mach_command': 'reftest',
         'kwargs': {'tests': []}
     },
-    'steeplechase': { },
+    'steeplechase': {},
     'web-platform-tests': {
         'mach_command': 'web-platform-tests',
         'kwargs': {'include': []}
     },
     'webapprt-chrome': {
         'mach_command': 'mochitest',
         'kwargs': {'flavor': 'webapprt-chrome', 'test_paths': []},
     },
     'xpcshell': {
         'mach_command': 'xpcshell-test',
         'kwargs': {'test_paths': []},
     },
 }
 
-
 for i in range(1, MOCHITEST_TOTAL_CHUNKS + 1):
     TEST_SUITES['mochitest-%d' %i] = {
         'aliases': ('M%d' % i, 'm%d' % i),
         'mach_command': 'mochitest',
         'kwargs': {
             'flavor': 'mochitest',
             'subsuite': 'default',
             'chunk_by_dir': MOCHITEST_CHUNK_BY_DIR,
--- a/testing/marionette/client/marionette/tests/webapi-tests.ini
+++ b/testing/marionette/client/marionette/tests/webapi-tests.ini
@@ -6,17 +6,16 @@ qemu = false
 browser = true
 
 ; true if the test is compatible with b2g, otherwise false
 b2g = true
 
 ; true if the test should be skipped
 skip = false
 
-; webapi tests
 [include:../../../../../dom/bluetooth/tests/marionette/manifest.ini]
 [include:../../../../../dom/telephony/test/marionette/manifest.ini]
 [include:../../../../../dom/voicemail/test/marionette/manifest.ini]
 [include:../../../../../dom/battery/test/marionette/manifest.ini]
 [include:../../../../../dom/mobilemessage/tests/marionette/manifest.ini]
 [include:../../../../../dom/mobileconnection/tests/marionette/manifest.ini]
 [include:../../../../../dom/system/gonk/tests/marionette/manifest.ini]
 [include:../../../../../dom/icc/tests/marionette/manifest.ini]
--- a/testing/marionette/mach_commands.py
+++ b/testing/marionette/mach_commands.py
@@ -110,10 +110,16 @@ class B2GCommands(MachCommandBase):
 @CommandProvider
 class MachCommands(MachCommandBase):
     @Command('marionette-test', category='testing',
         description='Run a Marionette test (Check UI or the internal JavaScript using marionette).',
         conditions=[conditions.is_firefox],
         parser=setup_argument_parser,
     )
     def run_marionette_test(self, tests, **kwargs):
+        if 'test_objects' in kwargs:
+            tests = []
+            for obj in kwargs['test_objects']:
+                tests.append(obj['file_relpath'])
+            del kwargs['test_objects']
+
         kwargs['binary'] = self.get_binary_path('app')
         return run_marionette(tests, topsrcdir=self.topsrcdir, **kwargs)
--- a/testing/marionette/moz.build
+++ b/testing/marionette/moz.build
@@ -1,11 +1,14 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += ["components", "atoms"]
 
 JAR_MANIFESTS += ["jar.mn"]
+MARIONETTE_UNIT_MANIFESTS += ['client/marionette/tests/unit/unit-tests.ini']
+MARIONETTE_UPDATE_MANIFESTS += ['client/marionette/tests/update-tests.ini']
+MARIONETTE_WEBAPI_MANIFESTS += ['client/marionette/tests/webapi-tests.ini']
 XPCSHELL_TESTS_MANIFESTS += ["unit.ini"]
 
 with Files("**"):
     BUG_COMPONENT = ("Testing", "Marionette")