Bug 1302364 - Enable firefox-ui and puppeteer test flavors. draft
authorHenrik Skupin <mail@hskupin.info>
Tue, 13 Sep 2016 17:27:17 +0200
changeset 413145 c337ef3f69dff7081b2d89507185c5b19abd73f2
parent 413144 274d4f246ce4e3ded78600b581abf61fe0a8ead6
child 531157 65b790fa9aa6724f293c54510e489b32afc0e8e8
push id29356
push userbmo:hskupin@gmail.com
push dateTue, 13 Sep 2016 18:17:46 +0000
bugs1302364
milestone51.0a1
Bug 1302364 - Enable firefox-ui and puppeteer test flavors. MozReview-Commit-ID: 9GBLSog99N7
testing/firefox-ui/mach_commands.py
testing/firefox-ui/moz.build
testing/mach_commands.py
--- a/testing/firefox-ui/mach_commands.py
+++ b/testing/firefox-ui/mach_commands.py
@@ -61,18 +61,24 @@ def run_firefox_ui_test(testtype=None, t
     }
 
     fxui_dir = os.path.join(topsrcdir, 'testing', 'firefox-ui')
 
     # Set the resources path which is used to serve test data via wptserve
     if not kwargs['server_root']:
         kwargs['server_root'] = os.path.join(fxui_dir, 'resources')
 
-    # If no tests have been selected, set default ones
-    if not kwargs.get('tests'):
+    # If called via "mach test" a dictionary of tests is passed in
+    if 'test_objects' in kwargs:
+        tests = []
+        for obj in kwargs['test_objects']:
+            tests.append(obj['file_relpath'])
+        kwargs['tests'] = tests
+    elif not kwargs.get('tests'):
+        # If no tests have been selected, set default ones
         kwargs['tests'] = [os.path.join(fxui_dir, 'tests', test)
                            for test in test_types[testtype]['default_tests']]
 
     kwargs['logger'] = commandline.setup_logging('Firefox UI - {} Tests'.format(testtype),
                                                  {"mach": sys.stdout})
 
     args = Namespace()
 
new file mode 100644
--- /dev/null
+++ b/testing/firefox-ui/moz.build
@@ -0,0 +1,11 @@
+# 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/.
+
+FIREFOX_UI_FUNCTIONAL_MANIFESTS += ["tests/functional/manifest.ini"]
+FIREFOX_UI_UPDATE_MANIFESTS += ["tests/update/manifest.ini"]
+# Bug 1272145: Move to testing/puppeteer/firefox
+PUPPETEER_FIREFOX_MANIFESTS += ["tests/puppeteer/manifest.ini"]
+
+with Files("**"):
+    BUG_COMPONENT = ("Testing", "Firefox UI Tests")
--- a/testing/mach_commands.py
+++ b/testing/mach_commands.py
@@ -56,16 +56,26 @@ TEST_SUITES = {
         'mach_command': 'crashtest',
         'kwargs': {'test_file': None},
     },
     'crashtest-ipc': {
         'aliases': ('Cipc', 'cipc'),
         'mach_command': 'crashtest-ipc',
         'kwargs': {'test_file': None},
     },
+    'firefox-ui-functional': {
+        'aliases': ('Fxfn',),
+        'mach_command': 'firefox-ui-functional',
+        'kwargs': {},
+    },
+    'firefox-ui-update': {
+        'aliases': ('Fxup',),
+        'mach_command': 'firefox-ui-update',
+        'kwargs': {},
+    },
     'jetpack': {
         'aliases': ('J',),
         'mach_command': 'jetpack-test',
         'kwargs': {},
     },
     'check-spidermonkey': {
         'aliases': ('Sm', 'sm'),
         'mach_command': 'check-spidermonkey',
@@ -138,16 +148,24 @@ TEST_FLAVORS = {
         'mach_command': 'mochitest',
         'kwargs': {'flavor': 'browser-chrome', 'test_paths': []},
     },
     'crashtest': {},
     'chrome': {
         'mach_command': 'mochitest',
         'kwargs': {'flavor': 'chrome', 'test_paths': []},
     },
+    'firefox-ui-functional': {
+        'mach_command': 'firefox-ui-functional',
+        'kwargs': {'tests': []},
+    },
+    'firefox-ui-update': {
+        'mach_command': 'firefox-ui-update',
+        'kwargs': {'tests': []},
+    },
     'marionette': {
         'mach_command': 'marionette-test',
         'kwargs': {'tests': []},
     },
     'mochitest': {
         'mach_command': 'mochitest',
         'kwargs': {'flavor': 'mochitest', 'test_paths': []},
     },