зеркало из https://github.com/mozilla/gecko-dev.git
Bug 983948 - Add mach mochitest-devtools r=jmaher
This commit is contained in:
Родитель
c420001bda
Коммит
d0f5dae6ab
|
@ -1,5 +1,7 @@
|
|||
[DEFAULT]
|
||||
skip-if = e10s # Bug ?????? - devtools tests disabled with e10s
|
||||
subsuite = devtools
|
||||
|
||||
support-files =
|
||||
head.js
|
||||
hosted_app.manifest
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
[DEFAULT]
|
||||
subsuite = devtools
|
||||
support-files =
|
||||
doc_simple-canvas.html
|
||||
doc_simple-canvas-deep-stack.html
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
[DEFAULT]
|
||||
skip-if = e10s # Bug ?????? - devtools tests disabled with e10s
|
||||
subsuite = devtools
|
||||
|
||||
support-files =
|
||||
head.js
|
||||
helpers.js
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
[DEFAULT]
|
||||
subsuite = devtools
|
||||
|
||||
support-files =
|
||||
browser_font.woff
|
||||
browser_fontinspector.html
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
[DEFAULT]
|
||||
skip-if = e10s # Bug ?????? - devtools tests disabled with e10s
|
||||
subsuite = devtools
|
||||
|
||||
support-files =
|
||||
browser_toolbox_options_disable_js.html
|
||||
browser_toolbox_options_disable_js_iframe.html
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
[DEFAULT]
|
||||
skip-if = e10s # Bug ?????? - devtools tests disabled with e10s
|
||||
subsuite = devtools
|
||||
|
||||
support-files =
|
||||
browser_inspector_breadcrumbs.html
|
||||
browser_inspector_bug_650804_search.html
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
[DEFAULT]
|
||||
support-files =
|
||||
head.js
|
||||
subsuite = devtools
|
||||
|
||||
[browser_layoutview.js]
|
||||
skip-if = true
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
[DEFAULT]
|
||||
skip-if = e10s # Bug ?????? - devtools tests disabled with e10s
|
||||
subsuite = devtools
|
||||
|
||||
support-files =
|
||||
doc_markup_edit.html
|
||||
doc_markup_flashing.html
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
[DEFAULT]
|
||||
skip-if = e10s # Bug ?????? - devtools tests disabled with e10s
|
||||
subsuite = devtools
|
||||
|
||||
support-files =
|
||||
head.js
|
||||
html_content-type-test-page.html
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
[DEFAULT]
|
||||
subsuite = devtools
|
||||
|
||||
# Crashes/timeouts on all platforms (bug 973974)
|
||||
skip-if = true
|
||||
support-files =
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
[DEFAULT]
|
||||
skip-if = e10s # Bug ?????? - devtools tests disabled with e10s
|
||||
subsuite = devtools
|
||||
|
||||
support-files =
|
||||
head.js
|
||||
touch.html
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
[DEFAULT]
|
||||
skip-if = e10s # Bug ?????? - devtools tests disabled with e10s
|
||||
subsuite = devtools
|
||||
|
||||
support-files = head.js
|
||||
|
||||
[browser_scratchpad_browser_last_window_closing.js]
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
[DEFAULT]
|
||||
skip-if = e10s # Bug ?????? - devtools tests disabled with e10s
|
||||
subsuite = devtools
|
||||
|
||||
support-files =
|
||||
doc_blended-geometry.html
|
||||
doc_multiple-contexts.html
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
[DEFAULT]
|
||||
skip-if = e10s # Bug ?????? - devtools tests disabled with e10s
|
||||
subsuite = devtools
|
||||
|
||||
support-files =
|
||||
browser_layoutHelpers.html
|
||||
browser_layoutHelpers_iframe.html
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
[DEFAULT]
|
||||
skip-if = e10s # Bug ?????? - devtools tests disabled with e10s
|
||||
subsuite = devtools
|
||||
|
||||
support-files =
|
||||
cm_comment_test.js
|
||||
cm_doc_test.js
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
[DEFAULT]
|
||||
skip-if = e10s # Bug ?????? - devtools tests disabled with e10s
|
||||
subsuite = devtools
|
||||
|
||||
support-files =
|
||||
autocomplete.html
|
||||
browser_styleeditor_cmd_edit.html
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
[DEFAULT]
|
||||
skip-if = e10s # Bug ?????? - devtools tests disabled with e10s
|
||||
subsuite = devtools
|
||||
|
||||
support-files =
|
||||
doc_content_stylesheet.html
|
||||
doc_content_stylesheet.xul
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
[DEFAULT]
|
||||
skip-if = e10s # Bug ?????? - devtools tests disabled with e10s
|
||||
subsuite = devtools
|
||||
|
||||
support-files = head.js
|
||||
|
||||
[browser_tilt_01_lazy_getter.js]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[DEFAULT]
|
||||
|
||||
subsuite = devtools
|
||||
support-files =
|
||||
doc_simple-context.html
|
||||
doc_complex-context.html
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
[DEFAULT]
|
||||
skip-if = e10s # Bug ?????? - devtools tests disabled with e10s
|
||||
subsuite = devtools
|
||||
|
||||
support-files =
|
||||
head.js
|
||||
test-bug-585956-console-trace.html
|
||||
|
|
|
@ -80,6 +80,11 @@ TEST_SUITES = {
|
|||
'mach_command': 'mochitest-chrome',
|
||||
'kwargs': {'test_file': None},
|
||||
},
|
||||
'mochitest-devtools': {
|
||||
'aliases': ('dt', 'DT', 'Dt'),
|
||||
'mach_command': 'mochitest-browser --subsuite=devtools',
|
||||
'kwargs': {'test_file': None},
|
||||
},
|
||||
'mochitest-ipcplugins': {
|
||||
'make_target': 'mochitest-ipcplugins',
|
||||
},
|
||||
|
|
|
@ -257,6 +257,7 @@ class MochitestRunner(MozbuildObject):
|
|||
opts = mochitest.MochitestOptions()
|
||||
options, args = opts.parse_args([])
|
||||
|
||||
options.subsuite = ''
|
||||
flavor = suite
|
||||
|
||||
# Need to set the suite options before verifyOptions below.
|
||||
|
@ -268,6 +269,9 @@ class MochitestRunner(MozbuildObject):
|
|||
elif suite == 'browser':
|
||||
options.browserChrome = True
|
||||
flavor = 'browser-chrome'
|
||||
elif suite == 'devtools':
|
||||
options.browserChrome = True
|
||||
options.subsuite = 'devtools'
|
||||
elif suite == 'metro':
|
||||
options.immersiveMode = True
|
||||
options.browserChrome = True
|
||||
|
@ -591,6 +595,13 @@ class MachCommands(MachCommandBase):
|
|||
def run_mochitest_browser(self, test_paths, **kwargs):
|
||||
return self.run_mochitest(test_paths, 'browser', **kwargs)
|
||||
|
||||
@Command('mochitest-devtools', category='testing',
|
||||
conditions=[conditions.is_firefox],
|
||||
description='Run a devtools mochitest with browser chrome.')
|
||||
@MochitestCommand
|
||||
def run_mochitest_devtools(self, test_paths, **kwargs):
|
||||
return self.run_mochitest(test_paths, 'devtools', **kwargs)
|
||||
|
||||
@Command('mochitest-metro', category='testing',
|
||||
conditions=[conditions.is_firefox],
|
||||
description='Run a mochitest with metro browser chrome.')
|
||||
|
|
|
@ -171,6 +171,12 @@ class MochitestOptions(optparse.OptionParser):
|
|||
"help": "run browser chrome Mochitests",
|
||||
"default": False,
|
||||
}],
|
||||
[["--subsuite"],
|
||||
{ "action": "store",
|
||||
"dest": "subsuite",
|
||||
"help": "subsuite of tests to run",
|
||||
"default": "",
|
||||
}],
|
||||
[["--webapprt-content"],
|
||||
{ "action": "store_true",
|
||||
"dest": "webapprtContent",
|
||||
|
|
|
@ -308,7 +308,10 @@ class MochitestUtilsMixin(object):
|
|||
# allow relative paths for logFile
|
||||
if options.logFile:
|
||||
options.logFile = self.getLogFilePath(options.logFile)
|
||||
if options.browserChrome or options.chrome or options.a11y or options.webapprtChrome:
|
||||
|
||||
# Note that all tests under options.subsuite need to be browser chrome tests.
|
||||
if options.browserChrome or options.chrome or options.subsuite or \
|
||||
options.a11y or options.webapprtChrome:
|
||||
self.makeTestConfig(options)
|
||||
else:
|
||||
if options.autorun:
|
||||
|
@ -463,9 +466,10 @@ class MochitestUtilsMixin(object):
|
|||
info[k] = v
|
||||
|
||||
# Bug 883858 - return all tests including disabled tests
|
||||
tests = manifest.active_tests(disabled=True, **info)
|
||||
tests = manifest.active_tests(disabled=True, options=options, **info)
|
||||
paths = []
|
||||
testPath = self.getTestPath(options)
|
||||
|
||||
for test in tests:
|
||||
pathAbs = os.path.abspath(test['path'])
|
||||
assert pathAbs.startswith(testRootAbs)
|
||||
|
|
|
@ -446,6 +446,9 @@ class ManifestParser(object):
|
|||
|
||||
# get the tests
|
||||
for section, data in sections:
|
||||
subsuite = ''
|
||||
if 'subsuite' in data:
|
||||
subsuite = data['subsuite']
|
||||
|
||||
# a file to include
|
||||
# TODO: keep track of included file structure:
|
||||
|
@ -498,6 +501,7 @@ class ManifestParser(object):
|
|||
else:
|
||||
_relpath = relpath(path, rootdir)
|
||||
|
||||
test['subsuite'] = subsuite
|
||||
test['path'] = path
|
||||
test['relpath'] = _relpath
|
||||
|
||||
|
@ -1080,15 +1084,21 @@ class TestManifest(ManifestParser):
|
|||
if parse(condition, **values):
|
||||
test['expected'] = 'fail'
|
||||
|
||||
def active_tests(self, exists=True, disabled=True, **values):
|
||||
def active_tests(self, exists=True, disabled=True, options=None, **values):
|
||||
"""
|
||||
- exists : return only existing tests
|
||||
- disabled : whether to return disabled tests
|
||||
- tags : keys and values to filter on (e.g. `os = linux mac`)
|
||||
"""
|
||||
|
||||
tests = [i.copy() for i in self.tests] # shallow copy
|
||||
|
||||
# Filter on current subsuite
|
||||
if options:
|
||||
if options.subsuite:
|
||||
tests = [test for test in tests if options.subsuite == test['subsuite']]
|
||||
else:
|
||||
tests = [test for test in tests if not test['subsuite']]
|
||||
|
||||
# mark all tests as passing unless indicated otherwise
|
||||
for test in tests:
|
||||
test['expected'] = test.get('expected', 'pass')
|
||||
|
|
|
@ -47,12 +47,16 @@ class TestDirectoryConversion(unittest.TestCase):
|
|||
manifest = convert([stub])
|
||||
self.assertEqual(str(manifest),
|
||||
"""[%(stub)s/bar]
|
||||
subsuite =
|
||||
|
||||
[%(stub)s/fleem]
|
||||
subsuite =
|
||||
|
||||
[%(stub)s/foo]
|
||||
subsuite =
|
||||
|
||||
[%(stub)s/subdir/subfile]
|
||||
subsuite =
|
||||
|
||||
""" % dict(stub=stub))
|
||||
except:
|
||||
|
|
|
@ -105,7 +105,7 @@ class TestManifestParser(unittest.TestCase):
|
|||
buffer = StringIO()
|
||||
parser.write(fp=buffer, global_kwargs={'foo': 'bar'})
|
||||
self.assertEqual(buffer.getvalue().strip(),
|
||||
'[DEFAULT]\nfoo = bar\n\n[fleem]\n\n[include/flowers]\nblue = ocean\nred = roses\nyellow = submarine')
|
||||
'[DEFAULT]\nfoo = bar\n\n[fleem]\nsubsuite = \n\n[include/flowers]\nblue = ocean\nred = roses\nsubsuite = \nyellow = submarine')
|
||||
|
||||
def test_copy(self):
|
||||
"""Test our ability to copy a set of manifests"""
|
||||
|
|
|
@ -20,7 +20,7 @@ include $(topsrcdir)/build/binary-location.mk
|
|||
SYMBOLS_PATH := --symbols-path=$(DIST)/crashreporter-symbols
|
||||
|
||||
# Usage: |make [TEST_PATH=...] [EXTRA_TEST_ARGS=...] mochitest*|.
|
||||
MOCHITESTS := mochitest-plain mochitest-chrome mochitest-a11y mochitest-ipcplugins
|
||||
MOCHITESTS := mochitest-plain mochitest-chrome mochitest-devtools mochitest-a11y mochitest-ipcplugins
|
||||
mochitest:: $(MOCHITESTS)
|
||||
|
||||
ifndef TEST_PACKAGE_NAME
|
||||
|
@ -145,6 +145,10 @@ mochitest-chrome:
|
|||
$(RUN_MOCHITEST) --chrome
|
||||
$(CHECK_TEST_ERROR)
|
||||
|
||||
mochitest-devtools:
|
||||
$(RUN_MOCHITEST) --subsuite=devtools
|
||||
$(CHECK_TEST_ERROR)
|
||||
|
||||
mochitest-a11y:
|
||||
$(RUN_MOCHITEST) --a11y
|
||||
$(CHECK_TEST_ERROR)
|
||||
|
@ -538,6 +542,7 @@ stage-mozbase: make-stage-dir
|
|||
mochitest \
|
||||
mochitest-plain \
|
||||
mochitest-chrome \
|
||||
mochitest-devtools \
|
||||
mochitest-a11y \
|
||||
mochitest-ipcplugins \
|
||||
reftest \
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
[DEFAULT]
|
||||
skip-if = e10s # Bug ?????? - devtools tests disabled with e10s
|
||||
subsuite = devtools
|
||||
support-files =
|
||||
head.js
|
||||
storage-dynamic-windows.html
|
||||
|
|
Загрузка…
Ссылка в новой задаче