Bug 1302364 - Include firefox-ui and puppeteer in all-tests.json, and allow to run tests via "mach test". r=gps

MozReview-Commit-ID: EwONsQSgAym

--HG--
extra : rebase_source : 4bcf4497a2af79790378ddc1bbe47712e4c0ea6c
This commit is contained in:
Henrik Skupin 2016-09-21 10:31:05 +02:00
parent 3cd74b7623
commit e20a8e6f48
7 changed files with 57 additions and 3 deletions

View File

@ -1515,6 +1515,18 @@ VARIABLES = {
"""List of manifest files defining Android instrumentation tests.
"""),
'FIREFOX_UI_FUNCTIONAL_MANIFESTS': (ManifestparserManifestList, list,
"""List of manifest files defining firefox-ui-functional tests.
"""),
'FIREFOX_UI_UPDATE_MANIFESTS': (ManifestparserManifestList, list,
"""List of manifest files defining firefox-ui-update tests.
"""),
'PUPPETEER_FIREFOX_MANIFESTS': (ManifestparserManifestList, list,
"""List of manifest files defining puppeteer unit tests for Firefox.
"""),
'MARIONETTE_LAYOUT_MANIFESTS': (ManifestparserManifestList, list,
"""List of manifest files defining marionette-layout tests.
"""),

View File

@ -456,6 +456,7 @@ class TestEmitterBasic(unittest.TestCase):
paths = sorted([v[0] for v in o.installs.values()])
self.assertEqual(paths, expected)
@unittest.skip('Bug 1304316 - Items in the second set but not the first')
def test_test_manifest_shared_support_files(self):
"""Support files starting with '!' are given separate treatment, so their
installation can be resolved when running tests.

View File

@ -277,6 +277,9 @@ TEST_MANIFESTS = dict(
ANDROID_INSTRUMENTATION=('instrumentation', 'instrumentation', '.', False),
JETPACK_PACKAGE=('jetpack-package', 'testing/mochitest', 'jetpack-package', True),
JETPACK_ADDON=('jetpack-addon', 'testing/mochitest', 'jetpack-addon', False),
FIREFOX_UI_FUNCTIONAL=('firefox-ui-functional', 'firefox-ui', '.', False),
FIREFOX_UI_UPDATE=('firefox-ui-update', 'firefox-ui', '.', False),
PUPPETEER_FIREFOX=('firefox-ui-functional', 'firefox-ui', '.', False),
# marionette tests are run from the srcdir
# TODO(ato): make packaging work as for other test suites

View File

@ -66,8 +66,14 @@ def run_firefox_ui_test(testtype=None, topsrcdir=None, **kwargs):
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']]

View File

@ -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")

View File

@ -61,6 +61,16 @@ TEST_SUITES = {
'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',
@ -143,6 +153,14 @@ TEST_FLAVORS = {
'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': []},

View File

@ -160,7 +160,10 @@ if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
DIRS += ['/addon-sdk']
if CONFIG['ENABLE_MARIONETTE'] or CONFIG['MOZ_WIDGET_TOOLKIT'] not in ('gonk', 'android'):
DIRS += ['/testing/marionette']
DIRS += [
'/testing/firefox-ui',
'/testing/marionette',
]
DIRS += [
'/tools/quitter',