зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1547996 - Fix mochitest-browser-chrome with mach addtest;r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D29364 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
6487cabf8b
Коммит
8ca66379e9
|
@ -56,7 +56,7 @@ add_task(async function test_TODO() {
|
||||||
|
|
||||||
class MochitestCreator(Creator):
|
class MochitestCreator(Creator):
|
||||||
templates = {
|
templates = {
|
||||||
"mochitest-browser": "browser.template.txt",
|
"mochitest-browser-chrome": "browser.template.txt",
|
||||||
"mochitest-plain": "plain%(doc)s.template.txt",
|
"mochitest-plain": "plain%(doc)s.template.txt",
|
||||||
"mochitest-chrome": "chrome%(doc)s.template.txt",
|
"mochitest-chrome": "chrome%(doc)s.template.txt",
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,7 @@ class MochitestCreator(Creator):
|
||||||
guessed_ini = {
|
guessed_ini = {
|
||||||
"mochitest-plain": "mochitest.ini",
|
"mochitest-plain": "mochitest.ini",
|
||||||
"mochitest-chrome": "chrome.ini",
|
"mochitest-chrome": "chrome.ini",
|
||||||
"mochitest-browser": "browser.ini"
|
"mochitest-browser-chrome": "browser.ini"
|
||||||
}[self.suite]
|
}[self.suite]
|
||||||
manifest_file = os.path.join(os.path.dirname(self.test), guessed_ini)
|
manifest_file = os.path.join(os.path.dirname(self.test), guessed_ini)
|
||||||
filename = os.path.basename(self.test)
|
filename = os.path.basename(self.test)
|
||||||
|
@ -308,5 +308,8 @@ TEST_CREATORS = {"mochitest": MochitestCreator,
|
||||||
|
|
||||||
|
|
||||||
def creator_for_suite(suite):
|
def creator_for_suite(suite):
|
||||||
base_suite = suite.rsplit("-", 1)[0]
|
if suite.split("-")[0] == "mochitest":
|
||||||
|
base_suite = "mochitest"
|
||||||
|
else:
|
||||||
|
base_suite = suite.rsplit("-", 1)[0]
|
||||||
return TEST_CREATORS.get(base_suite)
|
return TEST_CREATORS.get(base_suite)
|
||||||
|
|
|
@ -83,7 +83,7 @@ def get_test_parser():
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
|
|
||||||
ADD_TEST_SUPPORTED_SUITES = ['mochitest-chrome', 'mochitest-plain', 'mochitest-browser',
|
ADD_TEST_SUPPORTED_SUITES = ['mochitest-chrome', 'mochitest-plain', 'mochitest-browser-chrome',
|
||||||
'web-platform-tests-testharness', 'web-platform-tests-reftest',
|
'web-platform-tests-testharness', 'web-platform-tests-reftest',
|
||||||
'xpcshell']
|
'xpcshell']
|
||||||
ADD_TEST_SUPPORTED_DOCS = ['js', 'html', 'xhtml', 'xul']
|
ADD_TEST_SUPPORTED_DOCS = ['js', 'html', 'xhtml', 'xul']
|
||||||
|
@ -267,7 +267,7 @@ class AddTest(MachCommandBase):
|
||||||
guessed_suite = "xpcshell"
|
guessed_suite = "xpcshell"
|
||||||
else:
|
else:
|
||||||
if filename.startswith("browser_") and has_browser_ini:
|
if filename.startswith("browser_") and has_browser_ini:
|
||||||
guessed_suite = "mochitest-browser"
|
guessed_suite = "mochitest-browser-chrome"
|
||||||
elif filename.startswith("test_"):
|
elif filename.startswith("test_"):
|
||||||
if has_chrome_ini and has_plain_ini:
|
if has_chrome_ini and has_plain_ini:
|
||||||
err = ("Error: directory contains both a chrome.ini and mochitest.ini. "
|
err = ("Error: directory contains both a chrome.ini and mochitest.ini. "
|
||||||
|
|
Загрузка…
Ссылка в новой задаче