Bug 1873105 - convert .ini manifests to .toml: batch 22 remaining moz.build refs r=jmaher,jgilbert,extension-reviewers,robwu

Differential Revision: https://phabricator.services.mozilla.com/D198466
This commit is contained in:
Tom Marble 2024-01-24 23:19:47 +00:00
parent 5a48aa44db
commit 64d00dda75
41 changed files with 19120 additions and 14711 deletions

View File

@ -1,5 +0,0 @@
[DEFAULT]
skip-if = python == 3
subsuite = mozbuild
[compare-mozconfigs.py]

View File

@ -0,0 +1,5 @@
[DEFAULT]
skip-if = ["true"] # fails on Python 3
subsuite = "mozbuild"
["compare-mozconfigs.py"]

View File

@ -32,7 +32,7 @@ DEFINES["ACCEPTED_MAR_CHANNEL_IDS"] = CONFIG["ACCEPTED_MAR_CHANNEL_IDS"]
if CONFIG["MOZ_BUILD_APP"] == "browser":
PYTHON_UNITTEST_MANIFESTS += [
"compare-mozconfig/python.ini",
"compare-mozconfig/python.toml",
]
if CONFIG["ENABLE_TESTS"] or CONFIG["MOZ_DMD"]:

View File

@ -35,7 +35,7 @@ MOCHITEST_MANIFESTS += [
"test/crash/mochitest.toml",
"test/crossorigin/mochitest.toml",
"test/mochitest.toml",
"test/webgl-conf/generated-mochitest.ini",
"test/webgl-conf/generated-mochitest.toml",
"test/webgl-mochitest/mochitest.toml",
]

View File

@ -13,9 +13,9 @@ from pathlib import Path
# All paths in this file are based where this file is run.
WRAPPER_TEMPLATE_FILE = "mochi-wrapper.html.template"
MANIFEST_TEMPLATE_FILE = "mochitest.ini.template"
ERRATA_FILE = "mochitest-errata.ini"
DEST_MANIFEST_PATHSTR = "generated-mochitest.ini"
MANIFEST_TEMPLATE_FILE = "mochitest.toml.template"
ERRATA_FILE = "mochitest-errata.toml"
DEST_MANIFEST_PATHSTR = "generated-mochitest.toml"
BASE_TEST_LIST_PATHSTR = "checkout/00_test_list.txt"
GENERATED_PATHSTR = "generated"
@ -411,20 +411,21 @@ def WriteManifest(wrapperPathStrList, supportPathStrList):
# SUPPORT_FILES
supportPathStrList = [ManifestPathStr(x) for x in supportPathStrList]
supportPathStrList = sorted(supportPathStrList)
supportFilesStr = "\n".join(supportPathStrList)
supportFilesStr = '",\n "'.join(supportPathStrList)
supportFilesStr = '[\n "' + supportFilesStr + '",\n]'
# MANIFEST_TESTS
manifestTestLineList = []
wrapperPathStrList = sorted(wrapperPathStrList)
for wrapperPathStr in wrapperPathStrList:
wrapperManifestPathStr = ManifestPathStr(wrapperPathStr)
sectionName = "[" + wrapperManifestPathStr + "]"
sectionName = '\n["' + wrapperManifestPathStr + '"]'
manifestTestLineList.append(sectionName)
errataLines = []
subsuite = ChooseSubsuite(wrapperPathStr)
errataLines.append("subsuite = " + subsuite)
errataLines.append('subsuite = "' + subsuite + '"')
if wrapperPathStr in errataMap:
assert subsuite
@ -458,59 +459,58 @@ def WriteManifest(wrapperPathStrList, supportPathStrList):
# Internals
kManifestHeaderRegex = re.compile(r"\[([^]]*)\]")
def LoadINI(path):
def LoadTOML(path):
curSectionName = None
curSectionMap = {}
lineNum = 0
ret = {}
ret[curSectionName] = (lineNum, curSectionMap)
multiLineVal = False
key = ""
val = ""
with open(path, "r") as f:
for line in f:
for rawLine in f:
lineNum += 1
line = line.strip()
if not line:
continue
if line[0] in [";", "#"]:
continue
if line[0] == "[":
assert line[-1] == "]", "{}:{}".format(path, lineNum)
curSectionName = line[1:-1]
assert (
curSectionName not in ret
), "Line {}: Duplicate section: {}".format(lineNum, line)
curSectionMap = {}
ret[curSectionName] = (lineNum, curSectionMap)
continue
split = line.split("=", 1)
key = split[0].strip()
val = ""
if len(split) == 2:
val = split[1].strip()
curSectionMap[key] = (lineNum, val)
continue
if multiLineVal:
val += "\n" + rawLine.rstrip()
if rawLine.find("]") >= 0:
multiLineVal = False
curSectionMap[key] = (lineNum, val)
else:
line = rawLine.strip()
if not line:
continue
if line[0] in [";", "#"]:
continue
if line[0] == "[":
assert line[-1] == "]", "{}:{}".format(path, lineNum)
curSectionName = line[1:-1].strip('"')
assert (
curSectionName not in ret
), "Line {}: Duplicate section: {}".format(lineNum, line)
curSectionMap = {}
ret[curSectionName] = (lineNum, curSectionMap)
continue
split = line.split("=", 1)
key = split[0].strip()
val = ""
if len(split) == 2:
val = split[1].strip()
if val.find("[") >= 0 and val.find("]") < 0:
multiLineVal = True
else:
curSectionMap[key] = (lineNum, val)
return ret
def LoadErrata():
iniMap = LoadINI(ERRATA_FILE)
tomlMap = LoadTOML(ERRATA_FILE)
ret = {}
for sectionName, (sectionLineNum, sectionMap) in iniMap.items():
for sectionName, (sectionLineNum, sectionMap) in tomlMap.items():
curLines = []
if sectionName is None:

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,2 +0,0 @@
[DEFAULT]
support-files = foo.txt

View File

@ -0,0 +1,2 @@
[DEFAULT]
support-files = ["foo.txt"]

View File

@ -1,4 +1,4 @@
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
MOCHITEST_MANIFESTS += ["just-support.ini"]
MOCHITEST_MANIFESTS += ["just-support.toml"]

View File

@ -1,8 +1,5 @@
[DEFAULT]
head = [
"head1",
"head2",
]
head = "head1 head2"
dupe-manifest = true
["test_xpcshell.js"]

View File

@ -1,4 +1,4 @@
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
MOCHITEST_MANIFESTS += ["test.ini"]
MOCHITEST_MANIFESTS += ["test.toml"]

View File

@ -1,4 +0,0 @@
[DEFAULT]
generated-files = does_not_exist
[test_foo]

View File

@ -0,0 +1,4 @@
[DEFAULT]
generated-files = "does_not_exist"
["test_foo"]

View File

@ -14,4 +14,4 @@ TEST_DIRS += [
XPCSHELL_TESTS_MANIFESTS += ["unit/xpcshell.toml"]
if not CONFIG["MOZ_NO_SMART_CARDS"]:
XPCSHELL_TESTS_MANIFESTS += ["unit/xpcshell-smartcards.ini"]
XPCSHELL_TESTS_MANIFESTS += ["unit/xpcshell-smartcards.toml"]

View File

@ -1,17 +0,0 @@
[DEFAULT]
head = head_psm.js
tail =
tags = psm
skip-if = toolkit == 'android'
support-files =
[test_osclientcerts_module.js]
skip-if =
os == "linux"
os == "android"
[test_pkcs11_module.js]
[test_pkcs11_moduleDB.js]
[test_pkcs11_safe_mode.js]
[test_pkcs11_slot.js]
[test_pkcs11_token.js]
[test_pkcs11_tokenDB.js]

View File

@ -0,0 +1,22 @@
[DEFAULT]
head = "head_psm.js"
tags = "psm"
skip-if = ["os == 'android'"]
["test_osclientcerts_module.js"]
skip-if = [
"os == 'linux'",
"os == 'android'",
]
["test_pkcs11_module.js"]
["test_pkcs11_moduleDB.js"]
["test_pkcs11_safe_mode.js"]
["test_pkcs11_slot.js"]
["test_pkcs11_token.js"]
["test_pkcs11_tokenDB.js"]

View File

@ -6,8 +6,8 @@
BROWSER_CHROME_MANIFESTS += [
"test/browser.toml",
"test/browser_bug1717599_XDG-CONFIG-DIRS.ini",
"test/browser_bug1717599_XDG-CONFIG-HOME.ini",
"test/browser_bug1717599_XDG-CONFIG-DIRS.toml",
"test/browser_bug1717599_XDG-CONFIG-HOME.toml",
"test/browser_snap.toml",
"test/browser_xdg.toml",
]

View File

@ -1,9 +0,0 @@
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
[DEFAULT]
skip-if = ccov || (os == "linux" && (asan || tsan)) # bug 1784517
tags = contentsandbox
environment=XDG_CONFIG_DIRS=:/opt
[browser_content_sandbox_bug1717599_XDG-CONFIG-DIRS.js]
run-if = (os == 'linux')

View File

@ -0,0 +1,12 @@
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
[DEFAULT]
skip-if = [
"ccov",
"os == 'linux' && (asan || tsan)", # bug 1784517
]
tags = "contentsandbox"
environment = "XDG_CONFIG_DIRS=:/opt"
["browser_content_sandbox_bug1717599_XDG-CONFIG-DIRS.js"]
run-if = ["os == 'linux'"]

View File

@ -1,9 +0,0 @@
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
[DEFAULT]
skip-if = ccov || (os == "linux" && (asan || tsan)) # bug 1784517
tags = contentsandbox
environment=XDG_CONFIG_HOME=
[browser_content_sandbox_bug1717599_XDG-CONFIG-HOME.js]
run-if = (os == 'linux')

View File

@ -0,0 +1,10 @@
[DEFAULT]
skip-if = [
"ccov",
"os == 'linux' && (asan || tsan)", # bug 1784517
]
tags = "contentsandbox"
environment = "XDG_CONFIG_HOME="
["browser_content_sandbox_bug1717599_XDG-CONFIG-HOME.js"]
run-if = ["os == 'linux'"]

View File

@ -135,9 +135,9 @@ if CONFIG["MOZ_WEBEXT_WEBIDL_ENABLED"]:
MARIONETTE_MANIFESTS += ["test/marionette/manifest-serviceworker.toml"]
XPCSHELL_TESTS_MANIFESTS += [
"test/xpcshell/webidl-api/xpcshell.toml",
"test/xpcshell/xpcshell-serviceworker.ini",
"test/xpcshell/xpcshell-serviceworker.toml",
]
MOCHITEST_MANIFESTS += ["test/mochitest/mochitest-serviceworker.ini"]
MOCHITEST_MANIFESTS += ["test/mochitest/mochitest-serviceworker.toml"]
SPHINX_TREES["webextensions"] = "docs"

View File

@ -1,28 +0,0 @@
[DEFAULT]
tags = webextensions sw-webextensions condprof
skip-if =
!e10s # Thunderbird does still run in non e10s mode (and so also with in-process-webextensions mode)
http3
http2
prefs =
extensions.webextensions.remote=true
# We don't want to reset this at the end of the test, so that we don't have
# to spawn a new extension child process for each test unit.
dom.ipc.keepProcessesAlive.extension=1
extensions.backgroundServiceWorker.enabled=true
extensions.backgroundServiceWorker.forceInTestExtension=true
dupe-manifest = true
# `test_verify_sw_mode.html` should be the first one, even if it breaks the
# alphabetical order.
[test_verify_sw_mode.html]
[test_ext_scripting_contentScripts.html]
[test_ext_scripting_executeScript.html]
skip-if = true # Bug 1748315 - Add WebIDL bindings for `scripting.executeScript()`
[test_ext_scripting_insertCSS.html]
skip-if = true # Bug 1748318 - Add WebIDL bindings for `tabs`
[test_ext_scripting_removeCSS.html]
skip-if = true # Bug 1748318 - Add WebIDL bindings for `tabs`
[test_ext_test.html]

View File

@ -0,0 +1,34 @@
[DEFAULT]
tags = "webextensions sw-webextensions condprof"
skip-if = [
"!e10s", # Thunderbird does still run in non e10s mode (and so also with in-process-webextensions mode)
"http3",
"http2",
]
prefs = [
"extensions.webextensions.remote=true",
# We don't want to reset this at the end of the test, so that we don't have
# to spawn a new extension child process for each test unit.
"dom.ipc.keepProcessesAlive.extension=1",
"extensions.backgroundServiceWorker.enabled=true",
"extensions.backgroundServiceWorker.forceInTestExtension=true",
]
dupe-manifest = true
["test_verify_sw_mode.html"]
# `test_verify_sw_mode.html` should be the first one, even if it breaks the
# alphabetical order.
["test_ext_scripting_contentScripts.html"]
["test_ext_scripting_executeScript.html"]
skip-if = ["true"] # Bug 1748315 - Add WebIDL bindings for `scripting.executeScript()`
["test_ext_scripting_insertCSS.html"]
skip-if = ["true"] # Bug 1748318 - Add WebIDL bindings for `tabs`
["test_ext_scripting_removeCSS.html"]
skip-if = ["true"] # Bug 1748318 - Add WebIDL bindings for `tabs`
["test_ext_test.html"]

View File

@ -1,37 +0,0 @@
[DEFAULT]
head = head.js head_remote.js head_telemetry.js head_sync.js head_storage.js head_service_worker.js
tail =
firefox-appdir = browser
skip-if = os == "android"
dupe-manifest = true
support-files =
data/**
tags = webextensions sw-webextensions
run-sequentially = Bug 1760041 pass logged after tests when running multiple ini files
prefs =
extensions.backgroundServiceWorker.enabled=true
extensions.backgroundServiceWorker.forceInTestExtension=true
extensions.webextensions.remote=true
[test_ext_alarms.js]
[test_ext_alarms_does_not_fire.js]
[test_ext_alarms_periodic.js]
[test_ext_alarms_replaces.js]
[test_ext_background_service_worker.js]
[test_ext_browserSettings.js]
[test_ext_browserSettings_homepage.js]
skip-if =
appname == "thunderbird"
os == "android"
[test_ext_contentscript_dynamic_registration.js]
[test_ext_dns.js]
[test_ext_runtime_getBackgroundPage.js]
[test_ext_scripting_contentScripts.js]
[test_ext_scripting_contentScripts_css.js]
skip-if =
os == "linux" && debug && fission # Bug 1762638
os == "mac" && debug && fission # Bug 1762638
run-sequentially = very high failure rate in parallel
[test_ext_scripting_contentScripts_file.js]
[test_ext_scripting_updateContentScripts.js]

View File

@ -0,0 +1,51 @@
["DEFAULT"]
head = "head.js head_remote.js head_telemetry.js head_sync.js head_storage.js head_service_worker.js"
firefox-appdir = "browser"
skip-if = ["os == 'android'"]
dupe-manifest = true
support-files = "data/**"
tags = "webextensions sw-webextensions"
run-sequentially = "Bug 1760041 pass logged after tests when running multiple ini files"
prefs = [
"extensions.backgroundServiceWorker.enabled=true",
"extensions.backgroundServiceWorker.forceInTestExtension=true",
"extensions.webextensions.remote=true",
]
["test_ext_alarms.js"]
["test_ext_alarms_does_not_fire.js"]
["test_ext_alarms_periodic.js"]
["test_ext_alarms_replaces.js"]
["test_ext_background_service_worker.js"]
["test_ext_browserSettings.js"]
["test_ext_browserSettings_homepage.js"]
skip-if = [
"appname == 'thunderbird'",
"os == 'android'",
]
["test_ext_contentscript_dynamic_registration.js"]
["test_ext_dns.js"]
["test_ext_runtime_getBackgroundPage.js"]
["test_ext_scripting_contentScripts.js"]
["test_ext_scripting_contentScripts_css.js"]
skip-if = [
"os == 'linux' && debug && fission", # Bug 1762638
"os == 'mac' && debug && fission", # Bug 1762638
]
run-sequentially = "very high failure rate in parallel"
["test_ext_scripting_contentScripts_file.js"]
["test_ext_scripting_updateContentScripts.js"]

View File

@ -7,7 +7,7 @@ FINAL_TARGET = "_tests/xpcshell/toolkit/crashreporter/test"
XPCSHELL_TESTS_MANIFESTS += ["unit/xpcshell.toml", "unit_ipc/xpcshell.toml"]
if CONFIG["MOZ_PHC"]:
XPCSHELL_TESTS_MANIFESTS += ["unit/xpcshell-phc.ini", "unit_ipc/xpcshell-phc.ini"]
XPCSHELL_TESTS_MANIFESTS += ["unit/xpcshell-phc.toml", "unit_ipc/xpcshell-phc.toml"]
BROWSER_CHROME_MANIFESTS += ["browser/browser.toml"]

View File

@ -1,11 +0,0 @@
[DEFAULT]
head = head_crashreporter.js
skip-if =
toolkit == "android" # 1536217
os == "win" && msix # https://bugzilla.mozilla.org/show_bug.cgi?id=1807922
support-files =
crasher_subprocess_head.js
crasher_subprocess_tail.js
[test_crash_phc.js]

View File

@ -0,0 +1,12 @@
[DEFAULT]
head = "head_crashreporter.js"
skip-if = [
"toolkit == 'android'", # 1536217
"os == 'win' && msix", # https://bugzilla.mozilla.org/show_bug.cgi?id=1807922
]
support-files = [
"crasher_subprocess_head.js",
"crasher_subprocess_tail.js",
]
["test_crash_phc.js"]

View File

@ -1,11 +0,0 @@
[DEFAULT]
head =
skip-if = toolkit == "android" # 1536217
support-files =
!/toolkit/crashreporter/test/unit/crasher_subprocess_head.js
!/toolkit/crashreporter/test/unit/crasher_subprocess_tail.js
!/toolkit/crashreporter/test/unit/head_crashreporter.js
[test_content_phc.js]
[test_content_phc2.js]
[test_content_phc3.js]

View File

@ -0,0 +1,13 @@
[DEFAULT]
skip-if = ["os == 'android'"] # 1536217
support-files = [
"!/toolkit/crashreporter/test/unit/crasher_subprocess_head.js",
"!/toolkit/crashreporter/test/unit/crasher_subprocess_tail.js",
"!/toolkit/crashreporter/test/unit/head_crashreporter.js",
]
["test_content_phc.js"]
["test_content_phc2.js"]
["test_content_phc3.js"]

View File

@ -12,7 +12,7 @@ MOCHITEST_CHROME_MANIFESTS += ["mochitest/chrome.toml"]
XPCSHELL_TESTS_MANIFESTS += [
"xpcshell/rs-blocklist/xpcshell.toml",
"xpcshell/xpcshell-unpack.ini",
"xpcshell/xpcshell-unpack.toml",
"xpcshell/xpcshell.toml",
]

View File

@ -1,13 +0,0 @@
[DEFAULT]
head = head_addons.js head_unpack.js
tail =
firefox-appdir = browser
skip-if = toolkit == 'android'
dupe-manifest =
tags = addons
[test_webextension_paths.js]
tags = webextensions
[test_filepointer.js]
skip-if = !allow_legacy_extensions || require_signing

View File

@ -0,0 +1,15 @@
[DEFAULT]
head = "head_addons.js head_unpack.js"
firefox-appdir = "browser"
skip-if = ["os == 'android'"]
dupe-manifest = true
tags = "addons"
["test_filepointer.js"]
skip-if = [
"!allow_legacy_extensions",
"require_signing",
]
["test_webextension_paths.js"]
tags = "webextensions"

View File

@ -7,7 +7,7 @@ test-manifest-alpha:
- "**/xpcshell.ini"
- "**/python.ini"
- "**/manifest.ini"
- dom/canvas/test/webgl-conf/mochitest-errata.ini
- dom/canvas/test/webgl-conf/mochitest-errata.toml
- python/mozbuild/mozbuild/test/backend/data
- testing/mozbase/manifestparser/tests
- testing/web-platform

View File

@ -7,7 +7,7 @@ no-comment-disable:
exclude:
- "**/application.ini"
- "**/l10n.ini"
- dom/canvas/test/webgl-conf/mochitest-errata.ini
- dom/canvas/test/webgl-conf/mochitest-errata.toml
- testing/mozbase/manifestparser/tests
- testing/web-platform
- xpcom/tests/unit/data

View File

@ -8,7 +8,7 @@ multiline-skip-if:
exclude:
- "**/application.ini"
- "**/l10n.ini"
- dom/canvas/test/webgl-conf/mochitest-errata.ini
- dom/canvas/test/webgl-conf/mochitest-errata.toml
- testing/mozbase/manifestparser/tests
- testing/web-platform
- xpcom/tests/unit/data