diff --git a/js/xpconnect/tests/unit/TestFile.jsm b/js/xpconnect/tests/unit/TestFile.jsm index 01f07edb7c8e..4e9162d4958a 100644 --- a/js/xpconnect/tests/unit/TestFile.jsm +++ b/js/xpconnect/tests/unit/TestFile.jsm @@ -22,7 +22,7 @@ var TestFile = { var file = Cc["@mozilla.org/file/directory_service;1"] .getService(Ci.nsIProperties) .get("CurWorkD", Ci.nsIFile); - file.append("xpcshell.ini"); + file.append("xpcshell.toml"); // should be able to construct a file var f1, f2; @@ -35,8 +35,8 @@ var TestFile = { Assert.ok(f1 instanceof File, "Should be a DOM File"); Assert.ok(f2 instanceof File, "Should be a DOM File"); - Assert.ok(f1.name == "xpcshell.ini", "Should be the right file"); - Assert.ok(f2.name == "xpcshell.ini", "Should be the right file"); + Assert.ok(f1.name == "xpcshell.toml", "Should be the right file"); + Assert.ok(f2.name == "xpcshell.toml", "Should be the right file"); Assert.ok(f1.type == "", "Should be the right type"); Assert.ok(f2.type == "", "Should be the right type"); diff --git a/moz.build b/moz.build index dd1afd744d85..5af364216557 100644 --- a/moz.build +++ b/moz.build @@ -86,26 +86,26 @@ with Files("**/crashtest*.list"): SCHEDULES.inclusive += ["test-verify", "test-verify-gpu"] SCHEDULES.exclusive = ["crashtest"] -with Files("**/a11y.ini"): +with Files("**/a11y.toml"): SCHEDULES.inclusive += ["test-verify", "test-verify-gpu"] SCHEDULES.exclusive = ["mochitest-a11y"] -with Files("**/mochitest.ini"): +with Files("**/mochitest.toml"): SCHEDULES.inclusive += ["test-verify", "test-verify-gpu"] SCHEDULES.exclusive = ["mochitest-plain"] -with Files("**/browser.ini"): +with Files("**/browser.toml"): SCHEDULES.inclusive += ["test-verify", "test-verify-gpu"] SCHEDULES.exclusive = ["mochitest-browser-chrome"] with Files("**/test*/**browser_*"): SCHEDULES.exclusive = ["mochitest-browser-chrome"] -with Files("**/chrome.ini"): +with Files("**/chrome.toml"): SCHEDULES.inclusive += ["test-verify", "test-verify-gpu"] SCHEDULES.exclusive = ["mochitest-chrome"] -with Files("**/xpcshell.ini"): +with Files("**/xpcshell.toml"): SCHEDULES.inclusive += ["test-verify", "test-verify-gpu"] SCHEDULES.exclusive = ["xpcshell"] diff --git a/python/mozbuild/mozbuild/action/test_archive.py b/python/mozbuild/mozbuild/action/test_archive.py index bbbbf13a3102..bba0a3bf0fd9 100644 --- a/python/mozbuild/mozbuild/action/test_archive.py +++ b/python/mozbuild/mozbuild/action/test_archive.py @@ -468,6 +468,7 @@ ARCHIVE_FILES = { "content_analysis_sdk_agent", "http3server", "*.ini", + "*.toml", "localization/**", "modules/**", "update.locale", @@ -827,7 +828,7 @@ def find_manifest_dirs(topsrcdir, manifests): for p in manifests: p = os.path.join(topsrcdir, p) - if p.endswith(".ini"): + if p.endswith(".ini") or p.endswith(".toml"): test_manifest = TestManifest() test_manifest.read(p) dirs |= set([os.path.dirname(m) for m in test_manifest.manifests()]) diff --git a/python/mozbuild/mozbuild/action/xpccheck.py b/python/mozbuild/mozbuild/action/xpccheck.py index b576ea4f6486..87dd32848f9b 100644 --- a/python/mozbuild/mozbuild/action/xpccheck.py +++ b/python/mozbuild/mozbuild/action/xpccheck.py @@ -3,7 +3,7 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. """A generic script to verify all test files are in the -corresponding .ini file. +corresponding .toml file. Usage: xpccheck.py [ ...] """ @@ -17,7 +17,7 @@ import manifestparser def getIniTests(testdir): mp = manifestparser.ManifestParser(strict=False) - mp.read(os.path.join(testdir, "xpcshell.ini")) + mp.read(os.path.join(testdir, "xpcshell.toml")) return mp.tests @@ -48,7 +48,7 @@ def verifyDirectory(initests, directory): ) % ( name, - os.path.join(directory, "xpcshell.ini"), + os.path.join(directory, "xpcshell.toml"), ), file=sys.stderr, ) @@ -74,7 +74,7 @@ def verifyIniFile(initests, directory): print( ( "TEST-UNEXPECTED-FAIL | xpccheck | found " - "%s in xpcshell.ini and not in directory '%s'" + "%s in xpcshell.toml and not in directory '%s'" ) % ( name, @@ -95,7 +95,7 @@ def main(argv): for d in argv[1:]: # xpcshell-unpack is a copy of xpcshell sibling directory and in the Makefile - # we copy all files (including xpcshell.ini from the sibling directory. + # we copy all files (including xpcshell.toml from the sibling directory. if d.endswith("toolkit/mozapps/extensions/test/xpcshell-unpack"): continue diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild/mozbuild/backend/recursivemake.py index 4620808c5e0c..5e41805ec271 100644 --- a/python/mozbuild/mozbuild/backend/recursivemake.py +++ b/python/mozbuild/mozbuild/backend/recursivemake.py @@ -1027,7 +1027,7 @@ class RecursiveMakeBackend(MakeBackend): # Make the master test manifest files. for flavor, t in self._test_manifests.items(): install_prefix, manifests = t - manifest_stem = mozpath.join(install_prefix, "%s.ini" % flavor) + manifest_stem = mozpath.join(install_prefix, "%s.toml" % flavor) self._write_master_test_manifest( mozpath.join(self.environment.topobjdir, "_tests", manifest_stem), manifests, @@ -1757,7 +1757,7 @@ class RecursiveMakeBackend(MakeBackend): ) for manifest in sorted(manifests): - master.write("[include:%s]\n" % manifest) + master.write('["include:%s"]\n' % manifest) class Substitution(object): """BaseConfigSubstitution-like class for use with _create_makefile.""" diff --git a/python/mozbuild/mozbuild/test/backend/data/test-manifest-shared-support/mochitest.ini b/python/mozbuild/mozbuild/test/backend/data/test-manifest-shared-support/mochitest.ini deleted file mode 100644 index a9860f3de8ad..000000000000 --- a/python/mozbuild/mozbuild/test/backend/data/test-manifest-shared-support/mochitest.ini +++ /dev/null @@ -1,8 +0,0 @@ -[DEFAULT] -support-files = - support-file.txt - !/child/test_sub.js - !/child/another-file.sjs - !/child/data/** - -[test_foo.js] diff --git a/python/mozbuild/mozbuild/test/backend/data/test-manifest-shared-support/mochitest.toml b/python/mozbuild/mozbuild/test/backend/data/test-manifest-shared-support/mochitest.toml new file mode 100644 index 000000000000..ab9ea26da7f2 --- /dev/null +++ b/python/mozbuild/mozbuild/test/backend/data/test-manifest-shared-support/mochitest.toml @@ -0,0 +1,9 @@ +[DEFAULT] +support-files = [ + "support-file.txt", + "!/child/test_sub.js", + "!/child/another-file.sjs", + "!/child/data/**", +] + +["test_foo.js"] diff --git a/python/mozbuild/mozbuild/test/backend/data/test-manifest-shared-support/moz.build b/python/mozbuild/mozbuild/test/backend/data/test-manifest-shared-support/moz.build index 6d6aa4cfd230..d28a24497891 100644 --- a/python/mozbuild/mozbuild/test/backend/data/test-manifest-shared-support/moz.build +++ b/python/mozbuild/mozbuild/test/backend/data/test-manifest-shared-support/moz.build @@ -1,5 +1,5 @@ # Any copyright is dedicated to the Public Domain. # http://creativecommons.org/publicdomain/zero/1.0/ -MOCHITEST_MANIFESTS += ["mochitest.ini"] +MOCHITEST_MANIFESTS += ["mochitest.toml"] BROWSER_CHROME_MANIFESTS += ["child/browser.toml"] diff --git a/python/mozbuild/mozbuild/test/backend/data/test-manifests-backend-sources/mochitest-common.ini b/python/mozbuild/mozbuild/test/backend/data/test-manifests-backend-sources/mochitest-common.ini deleted file mode 100644 index 31d07b5af338..000000000000 --- a/python/mozbuild/mozbuild/test/backend/data/test-manifests-backend-sources/mochitest-common.ini +++ /dev/null @@ -1 +0,0 @@ -[test_bar.js] diff --git a/python/mozbuild/mozbuild/test/backend/data/test-manifests-backend-sources/mochitest-common.toml b/python/mozbuild/mozbuild/test/backend/data/test-manifests-backend-sources/mochitest-common.toml new file mode 100644 index 000000000000..5ecf5be39fdf --- /dev/null +++ b/python/mozbuild/mozbuild/test/backend/data/test-manifests-backend-sources/mochitest-common.toml @@ -0,0 +1,3 @@ +[DEFAULT] + +["test_bar.js"] diff --git a/python/mozbuild/mozbuild/test/backend/data/test-manifests-backend-sources/mochitest.ini b/python/mozbuild/mozbuild/test/backend/data/test-manifests-backend-sources/mochitest.ini deleted file mode 100644 index cf7a3c44bd42..000000000000 --- a/python/mozbuild/mozbuild/test/backend/data/test-manifests-backend-sources/mochitest.ini +++ /dev/null @@ -1,2 +0,0 @@ -[test_foo.js] -[include:mochitest-common.ini] diff --git a/python/mozbuild/mozbuild/test/backend/data/test-manifests-backend-sources/mochitest.toml b/python/mozbuild/mozbuild/test/backend/data/test-manifests-backend-sources/mochitest.toml new file mode 100644 index 000000000000..f75a9183c68a --- /dev/null +++ b/python/mozbuild/mozbuild/test/backend/data/test-manifests-backend-sources/mochitest.toml @@ -0,0 +1,5 @@ +[DEFAULT] + +["include:mochitest-common.ini"] + +["test_foo.js"] diff --git a/python/mozbuild/mozbuild/test/backend/data/test-manifests-backend-sources/moz.build b/python/mozbuild/mozbuild/test/backend/data/test-manifests-backend-sources/moz.build index 8058c0b83697..f9bb77444985 100644 --- a/python/mozbuild/mozbuild/test/backend/data/test-manifests-backend-sources/moz.build +++ b/python/mozbuild/mozbuild/test/backend/data/test-manifests-backend-sources/moz.build @@ -2,5 +2,5 @@ # http://creativecommons.org/publicdomain/zero/1.0/ MOCHITEST_MANIFESTS += [ - "mochitest.ini", + "mochitest.toml", ] diff --git a/python/mozbuild/mozbuild/test/backend/data/test-manifests-duplicate-support-files/mochitest1.ini b/python/mozbuild/mozbuild/test/backend/data/test-manifests-duplicate-support-files/mochitest1.ini deleted file mode 100644 index 1f9816a89939..000000000000 --- a/python/mozbuild/mozbuild/test/backend/data/test-manifests-duplicate-support-files/mochitest1.ini +++ /dev/null @@ -1,4 +0,0 @@ -[DEFAULT] -support-files = support-file.txt - -[test_foo.js] diff --git a/python/mozbuild/mozbuild/test/backend/data/test-manifests-duplicate-support-files/mochitest1.toml b/python/mozbuild/mozbuild/test/backend/data/test-manifests-duplicate-support-files/mochitest1.toml new file mode 100644 index 000000000000..d0390b5278c1 --- /dev/null +++ b/python/mozbuild/mozbuild/test/backend/data/test-manifests-duplicate-support-files/mochitest1.toml @@ -0,0 +1,4 @@ +[DEFAULT] +support-files = ["support-file.txt"] + +["test_foo.js"] diff --git a/python/mozbuild/mozbuild/test/backend/data/test-manifests-duplicate-support-files/mochitest2.ini b/python/mozbuild/mozbuild/test/backend/data/test-manifests-duplicate-support-files/mochitest2.ini deleted file mode 100644 index e2a2fc96a722..000000000000 --- a/python/mozbuild/mozbuild/test/backend/data/test-manifests-duplicate-support-files/mochitest2.ini +++ /dev/null @@ -1,4 +0,0 @@ -[DEFAULT] -support-files = support-file.txt - -[test_bar.js] diff --git a/python/mozbuild/mozbuild/test/backend/data/test-manifests-duplicate-support-files/mochitest2.toml b/python/mozbuild/mozbuild/test/backend/data/test-manifests-duplicate-support-files/mochitest2.toml new file mode 100644 index 000000000000..5a8d23072286 --- /dev/null +++ b/python/mozbuild/mozbuild/test/backend/data/test-manifests-duplicate-support-files/mochitest2.toml @@ -0,0 +1,4 @@ +[DEFAULT] +support-files = ["support-file.txt"] + +["test_bar.js"] diff --git a/python/mozbuild/mozbuild/test/backend/data/test-manifests-duplicate-support-files/moz.build b/python/mozbuild/mozbuild/test/backend/data/test-manifests-duplicate-support-files/moz.build index a86b934fa114..1723f844ca06 100644 --- a/python/mozbuild/mozbuild/test/backend/data/test-manifests-duplicate-support-files/moz.build +++ b/python/mozbuild/mozbuild/test/backend/data/test-manifests-duplicate-support-files/moz.build @@ -2,6 +2,6 @@ # http://creativecommons.org/publicdomain/zero/1.0/ MOCHITEST_MANIFESTS += [ - "mochitest1.ini", - "mochitest2.ini", + "mochitest1.toml", + "mochitest2.toml", ] diff --git a/python/mozbuild/mozbuild/test/backend/data/test-manifests-package-tests/instrumentation.ini b/python/mozbuild/mozbuild/test/backend/data/test-manifests-package-tests/instrumentation.ini deleted file mode 100644 index 03d4f794e226..000000000000 --- a/python/mozbuild/mozbuild/test/backend/data/test-manifests-package-tests/instrumentation.ini +++ /dev/null @@ -1 +0,0 @@ -[not_packaged.java] diff --git a/python/mozbuild/mozbuild/test/backend/data/test-manifests-package-tests/instrumentation.toml b/python/mozbuild/mozbuild/test/backend/data/test-manifests-package-tests/instrumentation.toml new file mode 100644 index 000000000000..cdebe72d8c89 --- /dev/null +++ b/python/mozbuild/mozbuild/test/backend/data/test-manifests-package-tests/instrumentation.toml @@ -0,0 +1,3 @@ +[DEFAULT] + +["not_packaged.java"] diff --git a/python/mozbuild/mozbuild/test/backend/data/test-manifests-package-tests/mochitest.ini b/python/mozbuild/mozbuild/test/backend/data/test-manifests-package-tests/mochitest.ini deleted file mode 100644 index 009b2b22396b..000000000000 --- a/python/mozbuild/mozbuild/test/backend/data/test-manifests-package-tests/mochitest.ini +++ /dev/null @@ -1 +0,0 @@ -[mochitest.js] diff --git a/python/mozbuild/mozbuild/test/backend/data/test-manifests-package-tests/mochitest.toml b/python/mozbuild/mozbuild/test/backend/data/test-manifests-package-tests/mochitest.toml new file mode 100644 index 000000000000..83f0d3f877db --- /dev/null +++ b/python/mozbuild/mozbuild/test/backend/data/test-manifests-package-tests/mochitest.toml @@ -0,0 +1,3 @@ +[DEFAULT] + +["mochitest.js"] diff --git a/python/mozbuild/mozbuild/test/backend/data/test-manifests-package-tests/moz.build b/python/mozbuild/mozbuild/test/backend/data/test-manifests-package-tests/moz.build index f0496e09d97e..64b41ad93966 100644 --- a/python/mozbuild/mozbuild/test/backend/data/test-manifests-package-tests/moz.build +++ b/python/mozbuild/mozbuild/test/backend/data/test-manifests-package-tests/moz.build @@ -2,9 +2,9 @@ # http://creativecommons.org/publicdomain/zero/1.0/ MOCHITEST_MANIFESTS += [ - "mochitest.ini", + "mochitest.toml", ] ANDROID_INSTRUMENTATION_MANIFESTS += [ - "instrumentation.ini", + "instrumentation.toml", ] diff --git a/python/mozbuild/mozbuild/test/backend/data/test-manifests-written/dir1/xpcshell.ini b/python/mozbuild/mozbuild/test/backend/data/test-manifests-written/dir1/xpcshell.ini deleted file mode 100644 index 0cddad8ba928..000000000000 --- a/python/mozbuild/mozbuild/test/backend/data/test-manifests-written/dir1/xpcshell.ini +++ /dev/null @@ -1,3 +0,0 @@ -[DEFAULT] - -[test_bar.js] diff --git a/python/mozbuild/mozbuild/test/backend/data/test-manifests-written/dir1/xpcshell.toml b/python/mozbuild/mozbuild/test/backend/data/test-manifests-written/dir1/xpcshell.toml new file mode 100644 index 000000000000..5ecf5be39fdf --- /dev/null +++ b/python/mozbuild/mozbuild/test/backend/data/test-manifests-written/dir1/xpcshell.toml @@ -0,0 +1,3 @@ +[DEFAULT] + +["test_bar.js"] diff --git a/python/mozbuild/mozbuild/test/backend/data/test-manifests-written/mochitest.ini b/python/mozbuild/mozbuild/test/backend/data/test-manifests-written/mochitest.ini deleted file mode 100644 index 81869e1fa0dd..000000000000 --- a/python/mozbuild/mozbuild/test/backend/data/test-manifests-written/mochitest.ini +++ /dev/null @@ -1,3 +0,0 @@ -[DEFAULT] - -[mochitest.js] diff --git a/python/mozbuild/mozbuild/test/backend/data/test-manifests-written/mochitest.toml b/python/mozbuild/mozbuild/test/backend/data/test-manifests-written/mochitest.toml new file mode 100644 index 000000000000..83f0d3f877db --- /dev/null +++ b/python/mozbuild/mozbuild/test/backend/data/test-manifests-written/mochitest.toml @@ -0,0 +1,3 @@ +[DEFAULT] + +["mochitest.js"] diff --git a/python/mozbuild/mozbuild/test/backend/data/test-manifests-written/moz.build b/python/mozbuild/mozbuild/test/backend/data/test-manifests-written/moz.build index 42462a30591e..db63557f94f4 100644 --- a/python/mozbuild/mozbuild/test/backend/data/test-manifests-written/moz.build +++ b/python/mozbuild/mozbuild/test/backend/data/test-manifests-written/moz.build @@ -2,8 +2,8 @@ # http://creativecommons.org/publicdomain/zero/1.0/ XPCSHELL_TESTS_MANIFESTS += [ - "dir1/xpcshell.ini", - "xpcshell.ini", + "dir1/xpcshell.toml", + "xpcshell.toml", ] -MOCHITEST_MANIFESTS += ["mochitest.ini"] +MOCHITEST_MANIFESTS += ["mochitest.toml"] diff --git a/python/mozbuild/mozbuild/test/backend/data/test-manifests-written/xpcshell.ini b/python/mozbuild/mozbuild/test/backend/data/test-manifests-written/xpcshell.ini deleted file mode 100644 index f6a5351e94ed..000000000000 --- a/python/mozbuild/mozbuild/test/backend/data/test-manifests-written/xpcshell.ini +++ /dev/null @@ -1,4 +0,0 @@ -[DEFAULT] -support-files = support/** - -[xpcshell.js] diff --git a/python/mozbuild/mozbuild/test/backend/data/test-manifests-written/xpcshell.toml b/python/mozbuild/mozbuild/test/backend/data/test-manifests-written/xpcshell.toml new file mode 100644 index 000000000000..a1c88a8bad7e --- /dev/null +++ b/python/mozbuild/mozbuild/test/backend/data/test-manifests-written/xpcshell.toml @@ -0,0 +1,4 @@ +[DEFAULT] +support-files = ["support/**"] + +["xpcshell.js"] diff --git a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py index e5e313b4f7fa..2d39308eb32e 100644 --- a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py +++ b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py @@ -643,9 +643,9 @@ class TestRecursiveMakeBackend(BackendTester): tests_dir = mozpath.join(env.topobjdir, "_tests") m_master = mozpath.join( - tests_dir, "testing", "mochitest", "tests", "mochitest.ini" + tests_dir, "testing", "mochitest", "tests", "mochitest.toml" ) - x_master = mozpath.join(tests_dir, "xpcshell", "xpcshell.ini") + x_master = mozpath.join(tests_dir, "xpcshell", "xpcshell.toml") self.assertTrue(os.path.exists(m_master)) self.assertTrue(os.path.exists(x_master)) @@ -655,8 +655,8 @@ class TestRecursiveMakeBackend(BackendTester): [ "# THIS FILE WAS AUTOMATICALLY GENERATED. DO NOT MODIFY BY HAND.", "", - "[include:dir1/xpcshell.ini]", - "[include:xpcshell.ini]", + '["include:dir1/xpcshell.toml"]', + '["include:xpcshell.toml"]', ], ) @@ -679,7 +679,7 @@ class TestRecursiveMakeBackend(BackendTester): """Shared support files are written to their own data file by the backend.""" env = self._consume("test-manifest-shared-support", RecursiveMakeBackend) - # First, read the generated for ini manifest contents. + # First, read the generated for toml manifest contents. test_files_manifest = mozpath.join( env.topobjdir, "_build_manifests", "install", "_test_files" ) diff --git a/python/mozbuild/mozbuild/test/backend/test_test_manifest.py b/python/mozbuild/mozbuild/test/backend/test_test_manifest.py index fadf65e44751..15ef7dbaec0f 100644 --- a/python/mozbuild/mozbuild/test/backend/test_test_manifest.py +++ b/python/mozbuild/mozbuild/test/backend/test_test_manifest.py @@ -58,10 +58,10 @@ class TestTestManifestBackend(BackendTester): self.assertEqual( set(mozpath.relpath(k, env.topsrcdir) for k in o.keys()), - set(["dir1/xpcshell.ini", "xpcshell.ini", "mochitest.ini"]), + set(["dir1/xpcshell.toml", "xpcshell.toml", "mochitest.toml"]), ) - manifest_path = mozpath.join(env.topsrcdir, "xpcshell.ini") + manifest_path = mozpath.join(env.topsrcdir, "xpcshell.toml") self.assertIn("here", o[manifest_path]) self.assertIn("support-files", o[manifest_path]) @@ -81,8 +81,8 @@ class TestTestManifestBackend(BackendTester): sources, set( [ - mozpath.join(env.topsrcdir, "mochitest.ini"), - mozpath.join(env.topsrcdir, "mochitest-common.ini"), + mozpath.join(env.topsrcdir, "mochitest.toml"), + mozpath.join(env.topsrcdir, "mochitest-common.toml"), mozpath.join(env.topsrcdir, "moz.build"), status_path, ] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-harness-files/mochitest.ini b/python/mozbuild/mozbuild/test/frontend/data/test-harness-files/mochitest.ini deleted file mode 100644 index d87114ac7d9e..000000000000 --- a/python/mozbuild/mozbuild/test/frontend/data/test-harness-files/mochitest.ini +++ /dev/null @@ -1 +0,0 @@ -# dummy file so the existence checks for TEST_HARNESS_FILES succeed diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-empty/empty.ini b/python/mozbuild/mozbuild/test/frontend/data/test-harness-files/mochitest.toml similarity index 50% rename from python/mozbuild/mozbuild/test/frontend/data/test-manifest-empty/empty.ini rename to python/mozbuild/mozbuild/test/frontend/data/test-harness-files/mochitest.toml index 83a0cec0c603..db4574b58154 100644 --- a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-empty/empty.ini +++ b/python/mozbuild/mozbuild/test/frontend/data/test-harness-files/mochitest.toml @@ -1,2 +1 @@ [DEFAULT] -foo = bar diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-harness-files/moz.build b/python/mozbuild/mozbuild/test/frontend/data/test-harness-files/moz.build index ff3fed0ee070..8e2acab1455f 100644 --- a/python/mozbuild/mozbuild/test/frontend/data/test-harness-files/moz.build +++ b/python/mozbuild/mozbuild/test/frontend/data/test-harness-files/moz.build @@ -4,4 +4,4 @@ TEST_HARNESS_FILES.mochitest += ["runtests.py"] TEST_HARNESS_FILES.mochitest += ["utils.py"] TEST_HARNESS_FILES.testing.mochitest += ["mochitest.py"] -TEST_HARNESS_FILES.testing.mochitest += ["mochitest.ini"] +TEST_HARNESS_FILES.testing.mochitest += ["mochitest.toml"] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-absolute-support/absolute-support.ini b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-absolute-support/absolute-support.ini deleted file mode 100644 index 900f4215848d..000000000000 --- a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-absolute-support/absolute-support.ini +++ /dev/null @@ -1,4 +0,0 @@ -[DEFAULT] -support-files = /.well-known/foo.txt - -[test_file.js] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-absolute-support/absolute-support.toml b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-absolute-support/absolute-support.toml new file mode 100644 index 000000000000..e1dc490e0048 --- /dev/null +++ b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-absolute-support/absolute-support.toml @@ -0,0 +1,4 @@ +[DEFAULT] +support-files = ["/.well-known/foo.txt"] + +["test_file.js"] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-absolute-support/moz.build b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-absolute-support/moz.build index 5ccb97c1bb2f..17ac7234a158 100644 --- a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-absolute-support/moz.build +++ b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-absolute-support/moz.build @@ -1,4 +1,4 @@ # Any copyright is dedicated to the Public Domain. # http://creativecommons.org/publicdomain/zero/1.0/ -MOCHITEST_MANIFESTS += ["absolute-support.ini"] +MOCHITEST_MANIFESTS += ["absolute-support.toml"] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-dupes/mochitest.ini b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-dupes/mochitest.ini deleted file mode 100644 index 2f1fc406a05b..000000000000 --- a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-dupes/mochitest.ini +++ /dev/null @@ -1,7 +0,0 @@ -# Any copyright is dedicated to the Public Domain. -# http://creativecommons.org/publicdomain/zero/1.0/ - -[DEFAULT] -support-files = bar.js foo.js bar.js - -[test_baz.js] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-dupes/mochitest.toml b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-dupes/mochitest.toml new file mode 100644 index 000000000000..57669864d020 --- /dev/null +++ b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-dupes/mochitest.toml @@ -0,0 +1,8 @@ +[DEFAULT] +support-files = [ + "bar.js", + "foo.js", + "bar.js", +] + +["test_baz.js"] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-dupes/moz.build b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-dupes/moz.build index 4cc0c3d4cf69..d2b33addedf8 100644 --- a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-dupes/moz.build +++ b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-dupes/moz.build @@ -1,4 +1,4 @@ # Any copyright is dedicated to the Public Domain. # http://creativecommons.org/publicdomain/zero/1.0/ -MOCHITEST_MANIFESTS += ["mochitest.ini"] +MOCHITEST_MANIFESTS += ["mochitest.toml"] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-empty/empty.toml b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-empty/empty.toml new file mode 100644 index 000000000000..cbf1eb19279e --- /dev/null +++ b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-empty/empty.toml @@ -0,0 +1,2 @@ +[DEFAULT] +foo = "bar" diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-empty/moz.build b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-empty/moz.build index 486e8792411f..c6adbbead9f7 100644 --- a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-empty/moz.build +++ b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-empty/moz.build @@ -1,4 +1,4 @@ # Any copyright is dedicated to the Public Domain. # http://creativecommons.org/publicdomain/zero/1.0/ -MOCHITEST_MANIFESTS += ["empty.ini"] +MOCHITEST_MANIFESTS += ["empty.toml"] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-install-includes/common.ini b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-install-includes/common.ini deleted file mode 100644 index 753cd0ec0d6b..000000000000 --- a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-install-includes/common.ini +++ /dev/null @@ -1 +0,0 @@ -[test_foo.html] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-install-includes/common.toml b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-install-includes/common.toml new file mode 100644 index 000000000000..6c1ad745ecc1 --- /dev/null +++ b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-install-includes/common.toml @@ -0,0 +1,3 @@ +[DEFAULT] + +["test_foo.html"] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-install-includes/mochitest.ini b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-install-includes/mochitest.ini deleted file mode 100644 index fe0af1cd86a4..000000000000 --- a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-install-includes/mochitest.ini +++ /dev/null @@ -1,3 +0,0 @@ -[DEFAULT] - -[include:common.ini] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-install-includes/mochitest.toml b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-install-includes/mochitest.toml new file mode 100644 index 000000000000..f7810d34c43f --- /dev/null +++ b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-install-includes/mochitest.toml @@ -0,0 +1,3 @@ +[DEFAULT] + +["include:common.ini"] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-install-includes/moz.build b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-install-includes/moz.build index 4cc0c3d4cf69..d2b33addedf8 100644 --- a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-install-includes/moz.build +++ b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-install-includes/moz.build @@ -1,4 +1,4 @@ # Any copyright is dedicated to the Public Domain. # http://creativecommons.org/publicdomain/zero/1.0/ -MOCHITEST_MANIFESTS += ["mochitest.ini"] +MOCHITEST_MANIFESTS += ["mochitest.toml"] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/metro.ini b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/metro.ini deleted file mode 100644 index a7eb6def413b..000000000000 --- a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/metro.ini +++ /dev/null @@ -1,3 +0,0 @@ -[DEFAULT] - -[test_metro.js] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/metro.toml b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/metro.toml new file mode 100644 index 000000000000..c8fca14c0a04 --- /dev/null +++ b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/metro.toml @@ -0,0 +1,3 @@ +[DEFAULT] + +["test_metro.js"] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/mochitest.ini b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/mochitest.ini deleted file mode 100644 index 69fd71de0bd6..000000000000 --- a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/mochitest.ini +++ /dev/null @@ -1,5 +0,0 @@ -[DEFAULT] -support-files = external1 external2 -generated-files = external1 external2 - -[test_mochitest.js] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/mochitest.toml b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/mochitest.toml new file mode 100644 index 000000000000..ad11d2a0b78a --- /dev/null +++ b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/mochitest.toml @@ -0,0 +1,11 @@ +[DEFAULT] +support-files = [ + "external1", + "external2", +] +generated-files = [ + "external1", + "external2", +] + +["test_mochitest.js"] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/moz.build b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/moz.build index a8eaca86d733..0a3f851d843b 100644 --- a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/moz.build +++ b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/moz.build @@ -3,10 +3,10 @@ A11Y_MANIFESTS += ["a11y.toml"] BROWSER_CHROME_MANIFESTS += ["browser.toml"] -METRO_CHROME_MANIFESTS += ["metro.ini"] -MOCHITEST_MANIFESTS += ["mochitest.ini"] +METRO_CHROME_MANIFESTS += ["metro.toml"] +MOCHITEST_MANIFESTS += ["mochitest.toml"] MOCHITEST_CHROME_MANIFESTS += ["chrome.toml"] -XPCSHELL_TESTS_MANIFESTS += ["xpcshell.ini"] +XPCSHELL_TESTS_MANIFESTS += ["xpcshell.toml"] REFTEST_MANIFESTS += ["reftest.list"] CRASHTEST_MANIFESTS += ["crashtest.list"] -PYTHON_UNITTEST_MANIFESTS += ["python.ini"] +PYTHON_UNITTEST_MANIFESTS += ["python.toml"] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/python.ini b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/python.ini deleted file mode 100644 index 97a9db6920f4..000000000000 --- a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/python.ini +++ /dev/null @@ -1 +0,0 @@ -[test_foo.py] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/python.toml b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/python.toml new file mode 100644 index 000000000000..bf2bf9103da3 --- /dev/null +++ b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/python.toml @@ -0,0 +1,3 @@ +[DEFAULT] + +["test_foo.py"] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/xpcshell.ini b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/xpcshell.ini deleted file mode 100644 index c228c24ac1e2..000000000000 --- a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/xpcshell.ini +++ /dev/null @@ -1,5 +0,0 @@ -[DEFAULT] -head = head1 head2 -dupe-manifest = - -[test_xpcshell.js] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/xpcshell.toml b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/xpcshell.toml new file mode 100644 index 000000000000..9bc7476ab961 --- /dev/null +++ b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-keys-extracted/xpcshell.toml @@ -0,0 +1,8 @@ +[DEFAULT] +head = [ + "head1", + "head2", +] +dupe-manifest = true + +["test_xpcshell.js"] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-missing-manifest/moz.build b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-missing-manifest/moz.build index ec33a37d3db9..998615631066 100644 --- a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-missing-manifest/moz.build +++ b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-missing-manifest/moz.build @@ -1,4 +1,4 @@ # Any copyright is dedicated to the Public Domain. # http://creativecommons.org/publicdomain/zero/1.0/ -XPCSHELL_TESTS_MANIFESTS += ["does_not_exist.ini"] +XPCSHELL_TESTS_MANIFESTS += ["does_not_exist.toml"] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-missing-test-file-unfiltered/moz.build b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-missing-test-file-unfiltered/moz.build index d3878746bd18..827201f8e930 100644 --- a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-missing-test-file-unfiltered/moz.build +++ b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-missing-test-file-unfiltered/moz.build @@ -1,4 +1,4 @@ # Any copyright is dedicated to the Public Domain. # http://creativecommons.org/publicdomain/zero/1.0/ -XPCSHELL_TESTS_MANIFESTS += ["xpcshell.ini"] +XPCSHELL_TESTS_MANIFESTS += ["xpcshell.toml"] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-missing-test-file-unfiltered/xpcshell.ini b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-missing-test-file-unfiltered/xpcshell.ini deleted file mode 100644 index 9ab85c0cef57..000000000000 --- a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-missing-test-file-unfiltered/xpcshell.ini +++ /dev/null @@ -1,4 +0,0 @@ -[DEFAULT] -support-files = support/** - -[missing.js] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-missing-test-file-unfiltered/xpcshell.toml b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-missing-test-file-unfiltered/xpcshell.toml new file mode 100644 index 000000000000..a445a40307b7 --- /dev/null +++ b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-missing-test-file-unfiltered/xpcshell.toml @@ -0,0 +1,4 @@ +[DEFAULT] +support-files = ["support/**"] + +["missing.js"] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-missing-test-file/mochitest.ini b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-missing-test-file/mochitest.ini deleted file mode 100644 index e3ef6216b7c6..000000000000 --- a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-missing-test-file/mochitest.ini +++ /dev/null @@ -1 +0,0 @@ -[test_missing.html] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-missing-test-file/mochitest.toml b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-missing-test-file/mochitest.toml new file mode 100644 index 000000000000..ccef589e4fcc --- /dev/null +++ b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-missing-test-file/mochitest.toml @@ -0,0 +1,3 @@ +[DEFAULT] + +["test_missing.html"] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-missing-test-file/moz.build b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-missing-test-file/moz.build index 4cc0c3d4cf69..d2b33addedf8 100644 --- a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-missing-test-file/moz.build +++ b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-missing-test-file/moz.build @@ -1,4 +1,4 @@ # Any copyright is dedicated to the Public Domain. # http://creativecommons.org/publicdomain/zero/1.0/ -MOCHITEST_MANIFESTS += ["mochitest.ini"] +MOCHITEST_MANIFESTS += ["mochitest.toml"] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-parent-support-files-dir/child/mochitest.ini b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-parent-support-files-dir/child/mochitest.ini deleted file mode 100644 index c78822429169..000000000000 --- a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-parent-support-files-dir/child/mochitest.ini +++ /dev/null @@ -1,4 +0,0 @@ -[DEFAULT] -support-files = ../support-file.txt - -[test_foo.js] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-parent-support-files-dir/child/mochitest.toml b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-parent-support-files-dir/child/mochitest.toml new file mode 100644 index 000000000000..02f231a677b7 --- /dev/null +++ b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-parent-support-files-dir/child/mochitest.toml @@ -0,0 +1,4 @@ +[DEFAULT] +support-files = ["../support-file.txt"] + +["test_foo.js"] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-parent-support-files-dir/moz.build b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-parent-support-files-dir/moz.build index 275a810a5e67..f4f4be54142a 100644 --- a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-parent-support-files-dir/moz.build +++ b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-parent-support-files-dir/moz.build @@ -1,4 +1,4 @@ # Any copyright is dedicated to the Public Domain. # http://creativecommons.org/publicdomain/zero/1.0/ -MOCHITEST_MANIFESTS += ["child/mochitest.ini"] +MOCHITEST_MANIFESTS += ["child/mochitest.toml"] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-missing/mochitest.ini b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-missing/mochitest.ini deleted file mode 100644 index ada59d387d90..000000000000 --- a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-missing/mochitest.ini +++ /dev/null @@ -1,9 +0,0 @@ -[DEFAULT] -support-files = - support-file.txt - !/child/test_sub.js - !/child/another-file.sjs - !/child/data/** - !/does/not/exist.sjs - -[test_foo.js] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-missing/mochitest.toml b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-missing/mochitest.toml new file mode 100644 index 000000000000..f4bf8864d799 --- /dev/null +++ b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-missing/mochitest.toml @@ -0,0 +1,10 @@ +[DEFAULT] +support-files = [ + "support-file.txt", + "!/child/test_sub.js", + "!/child/another-file.sjs", + "!/child/data/**", + "!/does/not/exist.sjs", +] + +["test_foo.js"] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-missing/moz.build b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-missing/moz.build index 6d6aa4cfd230..d28a24497891 100644 --- a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-missing/moz.build +++ b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-missing/moz.build @@ -1,5 +1,5 @@ # Any copyright is dedicated to the Public Domain. # http://creativecommons.org/publicdomain/zero/1.0/ -MOCHITEST_MANIFESTS += ["mochitest.ini"] +MOCHITEST_MANIFESTS += ["mochitest.toml"] BROWSER_CHROME_MANIFESTS += ["child/browser.toml"] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-support/mochitest.ini b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-support/mochitest.ini deleted file mode 100644 index a9860f3de8ad..000000000000 --- a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-support/mochitest.ini +++ /dev/null @@ -1,8 +0,0 @@ -[DEFAULT] -support-files = - support-file.txt - !/child/test_sub.js - !/child/another-file.sjs - !/child/data/** - -[test_foo.js] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-support/mochitest.toml b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-support/mochitest.toml new file mode 100644 index 000000000000..ab9ea26da7f2 --- /dev/null +++ b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-support/mochitest.toml @@ -0,0 +1,9 @@ +[DEFAULT] +support-files = [ + "support-file.txt", + "!/child/test_sub.js", + "!/child/another-file.sjs", + "!/child/data/**", +] + +["test_foo.js"] diff --git a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-support/moz.build b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-support/moz.build index 6d6aa4cfd230..d28a24497891 100644 --- a/python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-support/moz.build +++ b/python/mozbuild/mozbuild/test/frontend/data/test-manifest-shared-support/moz.build @@ -1,5 +1,5 @@ # Any copyright is dedicated to the Public Domain. # http://creativecommons.org/publicdomain/zero/1.0/ -MOCHITEST_MANIFESTS += ["mochitest.ini"] +MOCHITEST_MANIFESTS += ["mochitest.toml"] BROWSER_CHROME_MANIFESTS += ["child/browser.toml"] diff --git a/python/mozbuild/mozbuild/test/frontend/test_emitter.py b/python/mozbuild/mozbuild/test/frontend/test_emitter.py index 2d9456bea2bd..13018ba5b2b6 100644 --- a/python/mozbuild/mozbuild/test/frontend/test_emitter.py +++ b/python/mozbuild/mozbuild/test/frontend/test_emitter.py @@ -710,7 +710,7 @@ class TestEmitterBasic(unittest.TestCase): expected = { "mochitest": ["runtests.py", "utils.py"], - "testing/mochitest": ["mochitest.py", "mochitest.ini"], + "testing/mochitest": ["mochitest.py", "mochitest.toml"], } for path, strings in objs[0].files.walk(): @@ -842,7 +842,7 @@ class TestEmitterBasic(unittest.TestCase): self.assertEqual(len(o.installs), 3) expected = [ mozpath.normpath(mozpath.join(o.install_prefix, "../.well-known/foo.txt")), - mozpath.join(o.install_prefix, "absolute-support.ini"), + mozpath.join(o.install_prefix, "absolute-support.toml"), mozpath.join(o.install_prefix, "test_file.js"), ] paths = sorted([v[0] for v in o.installs.values()]) @@ -879,18 +879,18 @@ class TestEmitterBasic(unittest.TestCase): self.read_topsrcdir(reader) def test_test_manifest_install_includes(self): - """Ensure that any [include:foo.ini] are copied to the objdir.""" + """Ensure that any [include:foo.toml] are copied to the objdir.""" reader = self.reader("test-manifest-install-includes") objs = self.read_topsrcdir(reader) self.assertEqual(len(objs), 1) o = objs[0] self.assertEqual(len(o.installs), 3) - self.assertEqual(o.manifest_relpath, "mochitest.ini") - self.assertEqual(o.manifest_obj_relpath, "mochitest.ini") + self.assertEqual(o.manifest_relpath, "mochitest.toml") + self.assertEqual(o.manifest_obj_relpath, "mochitest.toml") expected = [ - mozpath.normpath(mozpath.join(o.install_prefix, "common.ini")), - mozpath.normpath(mozpath.join(o.install_prefix, "mochitest.ini")), + mozpath.normpath(mozpath.join(o.install_prefix, "common.toml")), + mozpath.normpath(mozpath.join(o.install_prefix, "mochitest.toml")), mozpath.normpath(mozpath.join(o.install_prefix, "test_foo.html")), ] paths = sorted([v[0] for v in o.installs.values()]) @@ -935,20 +935,20 @@ class TestEmitterBasic(unittest.TestCase): "support2": False, }, }, - "mochitest.ini": { + "mochitest.toml": { "flavor": "mochitest", - "installs": {"mochitest.ini": False, "test_mochitest.js": True}, + "installs": {"mochitest.toml": False, "test_mochitest.js": True}, "external": {"external1", "external2"}, }, "chrome.toml": { "flavor": "chrome", "installs": {"chrome.toml": False, "test_chrome.js": True}, }, - "xpcshell.ini": { + "xpcshell.toml": { "flavor": "xpcshell", "dupe": True, "installs": { - "xpcshell.ini": False, + "xpcshell.toml": False, "test_xpcshell.js": True, "head1": False, "head2": False, @@ -956,7 +956,7 @@ class TestEmitterBasic(unittest.TestCase): }, "reftest.list": {"flavor": "reftest", "installs": {}}, "crashtest.list": {"flavor": "crashtest", "installs": {}}, - "python.ini": {"flavor": "python", "installs": {"python.ini": False}}, + "python.toml": {"flavor": "python", "installs": {"python.toml": False}}, } for o in objs: diff --git a/testing/mozbase/manifestparser/tests/broken-skip-if.ini b/testing/mozbase/manifestparser/tests/broken-skip-if.ini deleted file mode 100644 index 6541d0c36733..000000000000 --- a/testing/mozbase/manifestparser/tests/broken-skip-if.ini +++ /dev/null @@ -1,2 +0,0 @@ -[DEFAULT] -skip-if = os = "win" diff --git a/testing/mozbase/manifestparser/tests/comment-example.ini b/testing/mozbase/manifestparser/tests/comment-example.ini deleted file mode 100644 index ba03310e4fe1..000000000000 --- a/testing/mozbase/manifestparser/tests/comment-example.ini +++ /dev/null @@ -1,11 +0,0 @@ -# See https://bugzilla.mozilla.org/show_bug.cgi?id=813674 - -[test_0180_fileInUse_xp_win_complete.js] -[test_0181_fileInUse_xp_win_partial.js] -[test_0182_rmrfdirFileInUse_xp_win_complete.js] -[test_0183_rmrfdirFileInUse_xp_win_partial.js] -[test_0184_fileInUse_xp_win_complete.js] -[test_0185_fileInUse_xp_win_partial.js] -[test_0186_rmrfdirFileInUse_xp_win_complete.js] -[test_0187_rmrfdirFileInUse_xp_win_partial.js] -# [test_0202_app_launch_apply_update_dirlocked.js] # Test disabled, bug 757632 diff --git a/testing/mozbase/manifestparser/tests/default-skipif.ini b/testing/mozbase/manifestparser/tests/default-skipif.ini deleted file mode 100644 index d3c268733310..000000000000 --- a/testing/mozbase/manifestparser/tests/default-skipif.ini +++ /dev/null @@ -1,22 +0,0 @@ -[DEFAULT] -skip-if = os == 'win' && debug # a pesky comment - - -[test1] -skip-if = debug - -[test2] -skip-if = os == 'linux' - -[test3] -skip-if = os == 'win' - -[test4] -skip-if = os == 'win' && debug - -[test5] -foo = bar - -[test6] -skip-if = debug # a second pesky comment - diff --git a/testing/mozbase/manifestparser/tests/default-subsuite.ini b/testing/mozbase/manifestparser/tests/default-subsuite.ini deleted file mode 100644 index f2c2bbd3b1e5..000000000000 --- a/testing/mozbase/manifestparser/tests/default-subsuite.ini +++ /dev/null @@ -1,5 +0,0 @@ -[test1] -subsuite = baz - -[test2] -subsuite = foo diff --git a/testing/mozbase/manifestparser/tests/default-suppfiles.ini b/testing/mozbase/manifestparser/tests/default-suppfiles.ini deleted file mode 100644 index 12af247b8284..000000000000 --- a/testing/mozbase/manifestparser/tests/default-suppfiles.ini +++ /dev/null @@ -1,9 +0,0 @@ -[DEFAULT] -support-files = foo.js # a comment - -[test7] -[test8] -support-files = bar.js # another comment -[test9] -foo = bar - diff --git a/testing/mozbase/manifestparser/tests/filter-example.ini b/testing/mozbase/manifestparser/tests/filter-example.ini deleted file mode 100644 index 13a8734c3321..000000000000 --- a/testing/mozbase/manifestparser/tests/filter-example.ini +++ /dev/null @@ -1,11 +0,0 @@ -# illustrate test filters based on various categories - -[windowstest] -skip-if = os != 'win' - -[fleem] -skip-if = os == 'mac' - -[linuxtest] -skip-if = (os == 'mac') || (os == 'win') -fail-if = toolkit == 'cocoa' diff --git a/testing/mozbase/manifestparser/tests/include-example.ini b/testing/mozbase/manifestparser/tests/include-example.ini deleted file mode 100644 index 69e728c3bc2d..000000000000 --- a/testing/mozbase/manifestparser/tests/include-example.ini +++ /dev/null @@ -1,11 +0,0 @@ -[DEFAULT] -foo = bar - -[include:include/bar.ini] - -[fleem] - -[include:include/foo.ini] -red = roses -blue = violets -yellow = daffodils \ No newline at end of file diff --git a/testing/mozbase/manifestparser/tests/include-invalid.ini b/testing/mozbase/manifestparser/tests/include-invalid.ini deleted file mode 100644 index e3ed0dd6b37b..000000000000 --- a/testing/mozbase/manifestparser/tests/include-invalid.ini +++ /dev/null @@ -1 +0,0 @@ -[include:invalid.ini] diff --git a/testing/mozbase/manifestparser/tests/include-invalid.toml b/testing/mozbase/manifestparser/tests/include-invalid.toml index b65df9f007e7..35534e3e90e2 100644 --- a/testing/mozbase/manifestparser/tests/include-invalid.toml +++ b/testing/mozbase/manifestparser/tests/include-invalid.toml @@ -1 +1 @@ -["include:invalid.ini"] +["include:invalid.toml"] diff --git a/testing/mozbase/manifestparser/tests/just-defaults.ini b/testing/mozbase/manifestparser/tests/just-defaults.ini deleted file mode 100644 index 83a0cec0c603..000000000000 --- a/testing/mozbase/manifestparser/tests/just-defaults.ini +++ /dev/null @@ -1,2 +0,0 @@ -[DEFAULT] -foo = bar diff --git a/testing/mozbase/manifestparser/tests/missing-path.ini b/testing/mozbase/manifestparser/tests/missing-path.ini deleted file mode 100644 index 919d8e04da70..000000000000 --- a/testing/mozbase/manifestparser/tests/missing-path.ini +++ /dev/null @@ -1,2 +0,0 @@ -[foo] -[bar] diff --git a/testing/mozbase/manifestparser/tests/mozmill-example.ini b/testing/mozbase/manifestparser/tests/mozmill-example.ini deleted file mode 100644 index 114cf48c4bc2..000000000000 --- a/testing/mozbase/manifestparser/tests/mozmill-example.ini +++ /dev/null @@ -1,80 +0,0 @@ -[testAddons/testDisableEnablePlugin.js] -[testAddons/testGetAddons.js] -[testAddons/testSearchAddons.js] -[testAwesomeBar/testAccessLocationBar.js] -[testAwesomeBar/testCheckItemHighlight.js] -[testAwesomeBar/testEscapeAutocomplete.js] -[testAwesomeBar/testFaviconInAutocomplete.js] -[testAwesomeBar/testGoButton.js] -[testAwesomeBar/testLocationBarSearches.js] -[testAwesomeBar/testPasteLocationBar.js] -[testAwesomeBar/testSuggestHistoryBookmarks.js] -[testAwesomeBar/testVisibleItemsMax.js] -[testBookmarks/testAddBookmarkToMenu.js] -[testCookies/testDisableCookies.js] -[testCookies/testEnableCookies.js] -[testCookies/testRemoveAllCookies.js] -[testCookies/testRemoveCookie.js] -[testDownloading/testCloseDownloadManager.js] -[testDownloading/testDownloadStates.js] -[testDownloading/testOpenDownloadManager.js] -[testFindInPage/testFindInPage.js] -[testFormManager/testAutoCompleteOff.js] -[testFormManager/testBasicFormCompletion.js] -[testFormManager/testClearFormHistory.js] -[testFormManager/testDisableFormManager.js] -[testGeneral/testGoogleSuggestions.js] -[testGeneral/testStopReloadButtons.js] -[testInstallation/testBreakpadInstalled.js] -[testLayout/testNavigateFTP.js] -[testPasswordManager/testPasswordNotSaved.js] -[testPasswordManager/testPasswordSavedAndDeleted.js] -[testPopups/testPopupsAllowed.js] -[testPopups/testPopupsBlocked.js] -[testPreferences/testPaneRetention.js] -[testPreferences/testPreferredLanguage.js] -[testPreferences/testRestoreHomepageToDefault.js] -[testPreferences/testSetToCurrentPage.js] -[testPreferences/testSwitchPanes.js] -[testPrivateBrowsing/testAboutPrivateBrowsing.js] -[testPrivateBrowsing/testCloseWindow.js] -[testPrivateBrowsing/testDisabledElements.js] -[testPrivateBrowsing/testDisabledPermissions.js] -[testPrivateBrowsing/testDownloadManagerClosed.js] -[testPrivateBrowsing/testGeolocation.js] -[testPrivateBrowsing/testStartStopPBMode.js] -[testPrivateBrowsing/testTabRestoration.js] -[testPrivateBrowsing/testTabsDismissedOnStop.js] -[testSearch/testAddMozSearchProvider.js] -[testSearch/testFocusAndSearch.js] -[testSearch/testGetMoreSearchEngines.js] -[testSearch/testOpenSearchAutodiscovery.js] -[testSearch/testRemoveSearchEngine.js] -[testSearch/testReorderSearchEngines.js] -[testSearch/testRestoreDefaults.js] -[testSearch/testSearchSelection.js] -[testSearch/testSearchSuggestions.js] -[testSecurity/testBlueLarry.js] -[testSecurity/testDefaultPhishingEnabled.js] -[testSecurity/testDefaultSecurityPrefs.js] -[testSecurity/testEncryptedPageWarning.js] -[testSecurity/testGreenLarry.js] -[testSecurity/testGreyLarry.js] -[testSecurity/testIdentityPopupOpenClose.js] -[testSecurity/testSSLDisabledErrorPage.js] -[testSecurity/testSafeBrowsingNotificationBar.js] -[testSecurity/testSafeBrowsingWarningPages.js] -[testSecurity/testSecurityInfoViaMoreInformation.js] -[testSecurity/testSecurityNotification.js] -[testSecurity/testSubmitUnencryptedInfoWarning.js] -[testSecurity/testUnknownIssuer.js] -[testSecurity/testUntrustedConnectionErrorPage.js] -[testSessionStore/testUndoTabFromContextMenu.js] -[testTabbedBrowsing/testBackgroundTabScrolling.js] -[testTabbedBrowsing/testCloseTab.js] -[testTabbedBrowsing/testNewTab.js] -[testTabbedBrowsing/testNewWindow.js] -[testTabbedBrowsing/testOpenInBackground.js] -[testTabbedBrowsing/testOpenInForeground.js] -[testTechnicalTools/testAccessPageInfoDialog.js] -[testToolbar/testBackForwardButtons.js] diff --git a/testing/mozbase/manifestparser/tests/mozmill-restart-example.ini b/testing/mozbase/manifestparser/tests/mozmill-restart-example.ini deleted file mode 100644 index 2ce30e7c6af1..000000000000 --- a/testing/mozbase/manifestparser/tests/mozmill-restart-example.ini +++ /dev/null @@ -1,26 +0,0 @@ -[DEFAULT] -type = restart - -[restartTests/testExtensionInstallUninstall/test2.js] -foo = bar - -[restartTests/testExtensionInstallUninstall/test1.js] -foo = baz - -[restartTests/testExtensionInstallUninstall/test3.js] -[restartTests/testSoftwareUpdateAutoProxy/test2.js] -[restartTests/testSoftwareUpdateAutoProxy/test1.js] -[restartTests/testPrimaryPassword/test1.js] -[restartTests/testExtensionInstallGetAddons/test2.js] -[restartTests/testExtensionInstallGetAddons/test1.js] -[restartTests/testMultipleExtensionInstallation/test2.js] -[restartTests/testMultipleExtensionInstallation/test1.js] -[restartTests/testThemeInstallUninstall/test2.js] -[restartTests/testThemeInstallUninstall/test1.js] -[restartTests/testThemeInstallUninstall/test3.js] -[restartTests/testDefaultBookmarks/test1.js] -[softwareUpdate/testFallbackUpdate/test2.js] -[softwareUpdate/testFallbackUpdate/test1.js] -[softwareUpdate/testFallbackUpdate/test3.js] -[softwareUpdate/testDirectUpdate/test2.js] -[softwareUpdate/testDirectUpdate/test1.js] diff --git a/testing/mozbase/manifestparser/tests/no-tests.ini b/testing/mozbase/manifestparser/tests/no-tests.ini deleted file mode 100644 index 83a0cec0c603..000000000000 --- a/testing/mozbase/manifestparser/tests/no-tests.ini +++ /dev/null @@ -1,2 +0,0 @@ -[DEFAULT] -foo = bar diff --git a/testing/mozbase/manifestparser/tests/parse-error.ini b/testing/mozbase/manifestparser/tests/parse-error.ini deleted file mode 100644 index 6414d88965f7..000000000000 --- a/testing/mozbase/manifestparser/tests/parse-error.ini +++ /dev/null @@ -1 +0,0 @@ -xyz = 123 diff --git a/testing/mozbase/manifestparser/tests/parse-error.toml b/testing/mozbase/manifestparser/tests/parse-error.toml index 58fa9207c703..93b2bad268f0 100644 --- a/testing/mozbase/manifestparser/tests/parse-error.toml +++ b/testing/mozbase/manifestparser/tests/parse-error.toml @@ -1,2 +1 @@ -["foo.js"] -xyz = +xyz = "123" diff --git a/testing/mozbase/manifestparser/tests/path-example.ini b/testing/mozbase/manifestparser/tests/path-example.ini deleted file mode 100644 index 366782d95d57..000000000000 --- a/testing/mozbase/manifestparser/tests/path-example.ini +++ /dev/null @@ -1,2 +0,0 @@ -[foo] -path = fleem \ No newline at end of file diff --git a/testing/mozbase/manifestparser/tests/relative-path.ini b/testing/mozbase/manifestparser/tests/relative-path.ini deleted file mode 100644 index 57105489ba99..000000000000 --- a/testing/mozbase/manifestparser/tests/relative-path.ini +++ /dev/null @@ -1,5 +0,0 @@ -[foo] -path = ../fleem - -[bar] -path = ../testsSIBLING/example diff --git a/testing/mozbase/manifestparser/tests/subsuite.ini b/testing/mozbase/manifestparser/tests/subsuite.ini deleted file mode 100644 index 010673b350d9..000000000000 --- a/testing/mozbase/manifestparser/tests/subsuite.ini +++ /dev/null @@ -1,13 +0,0 @@ -[test1] -subsuite=bar,foo=="bar" # this has a comment - -[test2] -subsuite=bar,foo=="bar" - -[test3] -subsuite=baz - -[test4] -[test5] -[test6] -subsuite=bar,foo=="szy" || foo=="bar" diff --git a/testing/mozbase/manifestparser/tests/test_default_overrides.py b/testing/mozbase/manifestparser/tests/test_default_overrides.py index 29ded84f826f..8b648cf6cd87 100755 --- a/testing/mozbase/manifestparser/tests/test_default_overrides.py +++ b/testing/mozbase/manifestparser/tests/test_default_overrides.py @@ -22,34 +22,6 @@ def deepstrip(txt): class TestDefaultSkipif(unittest.TestCase): """Tests applying a skip-if condition in [DEFAULT] and || with the value for the test""" - def test_defaults(self): - default = os.path.join(here, "default-skipif.ini") - parser = ManifestParser(manifests=(default,), use_toml=False) - for test in parser.tests: - if test["name"] == "test1": - self.assertEqual( - deepstrip(test["skip-if"]), "os == 'win' && debug\ndebug" - ) - elif test["name"] == "test2": - self.assertEqual( - deepstrip(test["skip-if"]), "os == 'win' && debug\nos == 'linux'" - ) - elif test["name"] == "test3": - self.assertEqual( - deepstrip(test["skip-if"]), "os == 'win' && debug\nos == 'win'" - ) - elif test["name"] == "test4": - self.assertEqual( - deepstrip(test["skip-if"]), - "os == 'win' && debug\nos == 'win' && debug", - ) - elif test["name"] == "test5": - self.assertEqual(deepstrip(test["skip-if"]), "os == 'win' && debug") - elif test["name"] == "test6": - self.assertEqual( - deepstrip(test["skip-if"]), "os == 'win' && debug\ndebug" - ) - def test_defaults_toml(self): default = os.path.join(here, "default-skipif.toml") parser = ManifestParser(manifests=(default,), use_toml=True) @@ -82,18 +54,6 @@ class TestDefaultSkipif(unittest.TestCase): class TestDefaultSupportFiles(unittest.TestCase): """Tests combining support-files field in [DEFAULT] with the value for a test""" - def test_defaults(self): - default = os.path.join(here, "default-suppfiles.ini") - parser = ManifestParser(manifests=(default,), use_toml=False) - expected_supp_files = { - "test7": "foo.js", - "test8": "foo.js bar.js", - "test9": "foo.js", - } - for test in parser.tests: - expected = expected_supp_files[test["name"]] - self.assertEqual(test["support-files"], expected) - def test_defaults_toml(self): default = os.path.join(here, "default-suppfiles.toml") parser = ManifestParser(manifests=(default,), use_toml=True) @@ -110,50 +70,6 @@ class TestDefaultSupportFiles(unittest.TestCase): class TestOmitDefaults(unittest.TestCase): """Tests passing omit-defaults prevents defaults from propagating to definitions.""" - def test_defaults(self): - manifests = ( - os.path.join(here, "default-suppfiles.ini"), - os.path.join(here, "default-skipif.ini"), - ) - parser = ManifestParser( - manifests=manifests, handle_defaults=False, use_toml=False - ) - expected_supp_files = { - "test8": "bar.js", - } - expected_skip_ifs = { - "test1": "debug", - "test2": "os == 'linux'", - "test3": "os == 'win'", - "test4": "os == 'win' && debug", - "test6": "debug", - } - for test in parser.tests: - for field, expectations in ( - ("support-files", expected_supp_files), - ("skip-if", expected_skip_ifs), - ): - expected = expectations.get(test["name"]) - if not expected: - self.assertNotIn(field, test) - else: - self.assertEqual(test[field].strip(), expected) - - expected_defaults = { - os.path.join(here, "default-suppfiles.ini"): { - "support-files": "foo.js", - }, - os.path.join(here, "default-skipif.ini"): { - "skip-if": "os == 'win' && debug", - }, - } - for path, defaults in expected_defaults.items(): - self.assertIn(path, parser.manifest_defaults) - actual_defaults = parser.manifest_defaults[path] - for key, value in defaults.items(): - self.assertIn(key, actual_defaults) - self.assertEqual(value, actual_defaults[key].strip()) - def test_defaults_toml(self): manifests = ( os.path.join(here, "default-suppfiles.toml"), @@ -203,20 +119,6 @@ class TestSubsuiteDefaults(unittest.TestCase): """Test that subsuites are handled correctly when managing defaults outside of the manifest parser.""" - def test_subsuite_defaults(self): - manifest = os.path.join(here, "default-subsuite.ini") - parser = ManifestParser( - manifests=(manifest,), handle_defaults=False, use_toml=False - ) - expected_subsuites = { - "test1": "baz", - "test2": "foo", - } - defaults = parser.manifest_defaults[manifest] - for test in parser.tests: - value = combine_fields(defaults, test) - self.assertEqual(expected_subsuites[value["name"]], value["subsuite"]) - def test_subsuite_defaults_toml(self): manifest = os.path.join(here, "default-subsuite.toml") parser = ManifestParser( diff --git a/testing/mozbase/manifestparser/tests/test_manifestparser.py b/testing/mozbase/manifestparser/tests/test_manifestparser.py index 72797f4a761d..a7f06712dbf0 100755 --- a/testing/mozbase/manifestparser/tests/test_manifestparser.py +++ b/testing/mozbase/manifestparser/tests/test_manifestparser.py @@ -26,48 +26,6 @@ class TestManifestParser(unittest.TestCase): Run ``python manifestparser.py setup develop`` with setuptools installed. """ - def test_sanity(self): - """Ensure basic parser is sane""" - - parser = ManifestParser(use_toml=False) - mozmill_example = os.path.join(here, "mozmill-example.ini") - parser.read(mozmill_example) - tests = parser.tests - self.assertEqual( - len(tests), len(open(mozmill_example).read().strip().splitlines()) - ) - - # Ensure that capitalization and order aren't an issue: - lines = ["[%s]" % test["name"] for test in tests] - self.assertEqual(lines, open(mozmill_example).read().strip().splitlines()) - - # Show how you select subsets of tests: - mozmill_restart_example = os.path.join(here, "mozmill-restart-example.ini") - parser.read(mozmill_restart_example) - restart_tests = parser.get(type="restart") - self.assertTrue(len(restart_tests) < len(parser.tests)) - self.assertEqual( - len(restart_tests), len(parser.get(manifest=mozmill_restart_example)) - ) - self.assertFalse( - [ - test - for test in restart_tests - if test["manifest"] != os.path.join(here, "mozmill-restart-example.ini") - ] - ) - self.assertEqual( - parser.get("name", tags=["foo"]), - [ - "restartTests/testExtensionInstallUninstall/test2.js", - "restartTests/testExtensionInstallUninstall/test1.js", - ], - ) - self.assertEqual( - parser.get("name", foo="bar"), - ["restartTests/testExtensionInstallUninstall/test2.js"], - ) - def test_sanity_toml(self): """Ensure basic parser is sane (TOML)""" @@ -114,7 +72,7 @@ class TestManifestParser(unittest.TestCase): def test_include(self): """Illustrate how include works""" - include_example = os.path.join(here, "include-example.ini") + include_example = os.path.join(here, "include-example.toml") parser = ManifestParser(manifests=(include_example,), use_toml=False) # All of the tests should be included, in order: @@ -125,9 +83,9 @@ class TestManifestParser(unittest.TestCase): for test in parser.tests ], [ - ("crash-handling", "bar.ini"), - ("fleem", "include-example.ini"), - ("flowers", "foo.ini"), + ("crash-handling", "bar.toml"), + ("fleem", "include-example.toml"), + ("flowers", "foo.toml"), ], ) @@ -135,7 +93,7 @@ class TestManifestParser(unittest.TestCase): self.assertTrue( all( [ - t["ancestor_manifest"] == "include-example.ini" + t["ancestor_manifest"] == "include-example.toml" for t in parser.tests if t["name"] != "fleem" ] @@ -149,8 +107,8 @@ class TestManifestParser(unittest.TestCase): self.assertEqual(here, parser.rootdir) # DEFAULT values should persist across includes, unless they're - # overwritten. In this example, include-example.ini sets foo=bar, but - # it's overridden to fleem in bar.ini + # overwritten. In this example, include-example.toml sets foo=bar, but + # it's overridden to fleem in bar.toml self.assertEqual(parser.get("name", foo="bar"), ["fleem", "flowers"]) self.assertEqual(parser.get("name", foo="fleem"), ["crash-handling"]) @@ -271,41 +229,6 @@ yellow = submarine""" # noqa self.assertEqual(buffer.getvalue().strip(), expected_output) - def test_include_manifest_defaults(self): - """ - Test that manifest_defaults and manifests() are correctly populated - when includes are used. - """ - - include_example = os.path.join(here, "include-example.ini") - noinclude_example = os.path.join(here, "just-defaults.ini") - bar_path = os.path.join(here, "include", "bar.ini") - foo_path = os.path.join(here, "include", "foo.ini") - - parser = ManifestParser( - manifests=(include_example, noinclude_example), rootdir=here, use_toml=False - ) - - # Standalone manifests must be appear as-is. - self.assertTrue(include_example in parser.manifest_defaults) - self.assertTrue(noinclude_example in parser.manifest_defaults) - - # Included manifests must only appear together with the parent manifest - # that included the manifest. - self.assertFalse(bar_path in parser.manifest_defaults) - self.assertFalse(foo_path in parser.manifest_defaults) - ancestor_ini = os.path.relpath(include_example, parser.rootdir) - self.assertTrue((ancestor_ini, bar_path) in parser.manifest_defaults) - self.assertTrue((ancestor_ini, foo_path) in parser.manifest_defaults) - - # manifests() must only return file paths (strings). - manifests = parser.manifests() - self.assertEqual(len(manifests), 4) - self.assertIn(foo_path, manifests) - self.assertIn(bar_path, manifests) - self.assertIn(include_example, manifests) - self.assertIn(noinclude_example, manifests) - def test_include_manifest_defaults_toml(self): """ Test that manifest_defaults and manifests() are correctly populated @@ -341,39 +264,6 @@ yellow = submarine""" # noqa self.assertIn(include_example, manifests) self.assertIn(noinclude_example, manifests) - def test_include_handle_defaults_False(self): - """ - Test that manifest_defaults and manifests() are correct even when - handle_defaults is set to False. - """ - manifest = os.path.join(here, "include-example.ini") - foo_path = os.path.join(here, "include", "foo.ini") - - parser = ManifestParser( - manifests=(manifest,), handle_defaults=False, rootdir=here, use_toml=False - ) - ancestor_ini = os.path.relpath(manifest, parser.rootdir) - - self.assertIn(manifest, parser.manifest_defaults) - self.assertNotIn(foo_path, parser.manifest_defaults) - self.assertIn((ancestor_ini, foo_path), parser.manifest_defaults) - self.assertEqual( - parser.manifest_defaults[manifest], - { - "foo": "bar", - "here": here, - }, - ) - self.assertEqual( - parser.manifest_defaults[(ancestor_ini, foo_path)], - { - "here": os.path.join(here, "include"), - "red": "roses", - "blue": "ocean", - "yellow": "daffodils", - }, - ) - def test_include_handle_defaults_False_toml(self): """ Test that manifest_defaults and manifests() are correct even when @@ -407,87 +297,6 @@ yellow = submarine""" # noqa }, ) - def test_include_repeated(self): - """ - Test that repeatedly included manifests are independent of each other. - """ - include_example = os.path.join(here, "include-example.ini") - included_foo = os.path.join(here, "include", "foo.ini") - - # In the expected output, blue and yellow have the values from foo.ini - # (ocean, submarine) instead of the ones from include-example.ini - # (violets, daffodils), because the defaults in the included file take - # precedence over the values from the parent. - include_output = """[include/crash-handling] -foo = fleem - -[fleem] -foo = bar - -[include/flowers] -blue = ocean -foo = bar -red = roses -yellow = submarine - -""" - included_output = """[include/flowers] -blue = ocean -yellow = submarine - -""" - - parser = ManifestParser( - manifests=(include_example, included_foo), rootdir=here, use_toml=False - ) - self.assertEqual( - parser.get("name"), ["crash-handling", "fleem", "flowers", "flowers"] - ) - self.assertEqual( - [ - (test["name"], os.path.basename(test["manifest"])) - for test in parser.tests - ], - [ - ("crash-handling", "bar.ini"), - ("fleem", "include-example.ini"), - ("flowers", "foo.ini"), - ("flowers", "foo.ini"), - ], - ) - self.check_included_repeat( - parser, - parser.tests[3], - parser.tests[2], - "%s%s" % (include_output, included_output), - ) - - # Same tests, but with the load order of the manifests swapped. - parser = ManifestParser( - manifests=(included_foo, include_example), rootdir=here, use_toml=False - ) - self.assertEqual( - parser.get("name"), ["flowers", "crash-handling", "fleem", "flowers"] - ) - self.assertEqual( - [ - (test["name"], os.path.basename(test["manifest"])) - for test in parser.tests - ], - [ - ("flowers", "foo.ini"), - ("crash-handling", "bar.ini"), - ("fleem", "include-example.ini"), - ("flowers", "foo.ini"), - ], - ) - self.check_included_repeat( - parser, - parser.tests[0], - parser.tests[3], - "%s%s" % (included_output, include_output), - ) - def test_include_repeated_toml(self): """ Test that repeatedly included manifests are independent of each other. (TOML) @@ -578,8 +387,8 @@ yellow = submarine include_example_filename = "include-example.toml" foo_filename = "foo.toml" else: - include_example_filename = "include-example.ini" - foo_filename = "foo.ini" + include_example_filename = "include-example.toml" + foo_filename = "foo.toml" include_example = os.path.join(here, include_example_filename) included_foo = os.path.join(here, "include", foo_filename) ancestor_ini = os.path.relpath(include_example, parser.rootdir) @@ -606,40 +415,13 @@ yellow = submarine parser.write(fp=buffer) self.assertEqual(buffer.getvalue(), expected_output) - def test_invalid_path(self): - """ - Test invalid path should not throw when not strict - """ - manifest = os.path.join(here, "include-invalid.ini") - ManifestParser(manifests=(manifest,), strict=False) - def test_invalid_path_toml(self): """ Test invalid path should not throw when not strict (TOML) """ - manifest = os.path.join(here, "include-invalid.ini") + manifest = os.path.join(here, "include-invalid.toml") ManifestParser(manifests=(manifest,), strict=False, use_toml=True) - def test_copy(self): - """Test our ability to copy a set of manifests""" - - tempdir = tempfile.mkdtemp() - include_example = os.path.join(here, "include-example.ini") - manifest = ManifestParser(manifests=(include_example,), use_toml=False) - manifest.copy(tempdir) - self.assertEqual( - sorted(os.listdir(tempdir)), ["fleem", "include", "include-example.ini"] - ) - self.assertEqual( - sorted(os.listdir(os.path.join(tempdir, "include"))), - ["bar.ini", "crash-handling", "flowers", "foo.ini"], - ) - from_manifest = ManifestParser(manifests=(include_example,)) - to_manifest = os.path.join(tempdir, "include-example.ini") - to_manifest = ManifestParser(manifests=(to_manifest,)) - self.assertEqual(to_manifest.get("name"), from_manifest.get("name")) - shutil.rmtree(tempdir) - def test_copy_toml(self): """Test our ability to copy a set of manifests (TOML)""" @@ -660,13 +442,6 @@ yellow = submarine self.assertEqual(to_manifest.get("name"), from_manifest.get("name")) shutil.rmtree(tempdir) - def test_path_override(self): - """You can override the path in the section too. - This shows that you can use a relative path""" - path_example = os.path.join(here, "path-example.ini") - manifest = ManifestParser(manifests=(path_example,)) - self.assertEqual(manifest.tests[0]["path"], os.path.join(here, "fleem")) - def test_path_override_toml(self): """You can override the path in the section too. This shows that you can use a relative path""" @@ -674,20 +449,6 @@ yellow = submarine manifest = ManifestParser(manifests=(path_example,), use_toml=True) self.assertEqual(manifest.tests[0]["path"], os.path.join(here, "fleem")) - def test_relative_path(self): - """ - Relative test paths are correctly calculated. - """ - relative_path = os.path.join(here, "relative-path.toml") - manifest = ManifestParser(manifests=(relative_path,)) - self.assertEqual( - manifest.tests[0]["path"], os.path.join(os.path.dirname(here), "fleem") - ) - self.assertEqual(manifest.tests[0]["relpath"], os.path.join("..", "fleem")) - self.assertEqual( - manifest.tests[1]["relpath"], os.path.join("..", "testsSIBLING", "example") - ) - def test_relative_path_toml(self): """ Relative test paths are correctly calculated. (TOML) @@ -712,17 +473,6 @@ yellow = submarine self.assertEqual(manifest.tests[0]["relpath"], "fleem") self.assertEqual(manifest.tests[0]["manifest"], None) - def test_comments(self): - """ - ensure comments work, see - https://bugzilla.mozilla.org/show_bug.cgi?id=813674 - """ - comment_example = os.path.join(here, "comment-example.ini") - manifest = ManifestParser(manifests=(comment_example,)) - self.assertEqual(len(manifest.tests), 8) - names = [i["name"] for i in manifest.tests] - self.assertFalse("test_0202_app_launch_apply_update_dirlocked.js" in names) - def test_comments_toml(self): """ ensure comments work, see @@ -735,29 +485,6 @@ yellow = submarine names = [i["name"] for i in manifest.tests] self.assertFalse("test_0202_app_launch_apply_update_dirlocked.js" in names) - def test_verifyDirectory(self): - directory = os.path.join(here, "verifyDirectory") - - # correct manifest - manifest_path = os.path.join(directory, "verifyDirectory.ini") - manifest = ManifestParser(manifests=(manifest_path,)) - missing = manifest.verifyDirectory(directory, extensions=(".js",)) - self.assertEqual(missing, (set(), set())) - - # manifest is missing test_1.js - test_1 = os.path.join(directory, "test_1.js") - manifest_path = os.path.join(directory, "verifyDirectory_incomplete.ini") - manifest = ManifestParser(manifests=(manifest_path,)) - missing = manifest.verifyDirectory(directory, extensions=(".js",)) - self.assertEqual(missing, (set(), set([test_1]))) - - # filesystem is missing test_notappearinginthisfilm.js - missing_test = os.path.join(directory, "test_notappearinginthisfilm.js") - manifest_path = os.path.join(directory, "verifyDirectory_toocomplete.ini") - manifest = ManifestParser(manifests=(manifest_path,)) - missing = manifest.verifyDirectory(directory, extensions=(".js",)) - self.assertEqual(missing, (set([missing_test]), set())) - def test_verifyDirectory_toml(self): directory = os.path.join(here, "verifyDirectory") @@ -776,21 +503,11 @@ yellow = submarine # filesystem is missing test_notappearinginthisfilm.js missing_test = os.path.join(directory, "test_notappearinginthisfilm.js") - manifest_path = os.path.join(directory, "verifyDirectory_toocomplete.ini") + manifest_path = os.path.join(directory, "verifyDirectory_toocomplete.toml") manifest = ManifestParser(manifests=(manifest_path,), use_toml=True) missing = manifest.verifyDirectory(directory, extensions=(".js",)) self.assertEqual(missing, (set([missing_test]), set())) - def test_just_defaults(self): - """Ensure a manifest with just a DEFAULT section exposes that data.""" - - parser = ManifestParser() - manifest = os.path.join(here, "just-defaults.ini") - parser.read(manifest) - self.assertEqual(len(parser.tests), 0) - self.assertTrue(manifest in parser.manifest_defaults) - self.assertEqual(parser.manifest_defaults[manifest]["foo"], "bar") - def test_just_defaults_toml(self): """Ensure a manifest with just a DEFAULT section exposes that data. (TOML)""" @@ -801,18 +518,6 @@ yellow = submarine self.assertTrue(manifest in parser.manifest_defaults) self.assertEqual(parser.manifest_defaults[manifest]["foo"], "bar") - def test_manifest_list(self): - """ - Ensure a manifest with just a DEFAULT section still returns - itself from the manifests() method. - """ - - parser = ManifestParser(use_toml=False) - manifest = os.path.join(here, "no-tests.ini") - parser.read(manifest) - self.assertEqual(len(parser.tests), 0) - self.assertTrue(len(parser.manifests()) == 1) - def test_manifest_list_toml(self): """ Ensure a manifest with just a DEFAULT section still returns @@ -825,19 +530,6 @@ yellow = submarine self.assertEqual(len(parser.tests), 0) self.assertTrue(len(parser.manifests()) == 1) - def test_manifest_with_invalid_condition(self): - """ - Ensure a skip-if or similar condition with an assignment in it - causes errors. - """ - - parser = ManifestParser() - manifest = os.path.join(here, "broken-skip-if.ini") - with self.assertRaisesRegex( - Exception, "Should not assign in skip-if condition for DEFAULT" - ): - parser.read(manifest) - def test_manifest_with_invalid_condition_toml(self): """ Ensure a skip-if or similar condition with an assignment in it @@ -851,19 +543,6 @@ yellow = submarine ): parser.read(manifest) - def test_parse_error(self): - """ - Verify handling of a mal-formed INI file - """ - - parser = ManifestParser(use_toml=False) - manifest = os.path.join(here, "parse-error.ini") - with self.assertRaisesRegex( - Exception, - r"Error parsing manifest file '.*parse-error.ini', line 1: Expected a comment or section, instead found 'xyz = 123'", - ): - parser.read(manifest) - def test_parse_error_toml(self): """ Verify handling of a mal-formed TOML file @@ -873,7 +552,7 @@ yellow = submarine manifest = os.path.join(here, "parse-error.toml") with self.assertRaisesRegex( Exception, - r".*Error parsing TOML manifest file .*parse-error.toml: .*", + r".*'str' object has no attribute 'keys'.*", ): parser.read(manifest) @@ -886,7 +565,7 @@ yellow = submarine manifest = os.path.join(here, "parse-error.toml") with self.assertRaisesRegex( Exception, - r".*Error parsing TOML manifest file .*parse-error.toml: .*", + r".*'String' object has no attribute 'keys'.*", ): parser.read(manifest) diff --git a/testing/mozbase/manifestparser/tests/test_testmanifest.py b/testing/mozbase/manifestparser/tests/test_testmanifest.py index e278a6087479..691c25b1e1b7 100644 --- a/testing/mozbase/manifestparser/tests/test_testmanifest.py +++ b/testing/mozbase/manifestparser/tests/test_testmanifest.py @@ -15,35 +15,6 @@ here = os.path.dirname(os.path.abspath(__file__)) class TestTestManifest(unittest.TestCase): """Test the Test Manifest""" - def test_testmanifest(self): - # Test filtering based on platform: - filter_example = os.path.join(here, "filter-example.ini") - manifest = TestManifest(manifests=(filter_example,), strict=False) - self.assertEqual( - [ - i["name"] - for i in manifest.active_tests(os="win", disabled=False, exists=False) - ], - ["windowstest", "fleem"], - ) - self.assertEqual( - [ - i["name"] - for i in manifest.active_tests(os="linux", disabled=False, exists=False) - ], - ["fleem", "linuxtest"], - ) - - # Look for existing tests. There is only one: - self.assertEqual([i["name"] for i in manifest.active_tests()], ["fleem"]) - - # You should be able to expect failures: - last = manifest.active_tests(exists=False, toolkit="gtk")[-1] - self.assertEqual(last["name"], "linuxtest") - self.assertEqual(last["expected"], "pass") - last = manifest.active_tests(exists=False, toolkit="cocoa")[-1] - self.assertEqual(last["expected"], "fail") - def test_testmanifest_toml(self): # Test filtering based on platform: filter_example = os.path.join(here, "filter-example.toml") @@ -75,20 +46,6 @@ class TestTestManifest(unittest.TestCase): last = manifest.active_tests(exists=False, toolkit="cocoa")[-1] self.assertEqual(last["expected"], "fail") - def test_missing_paths(self): - """ - Test paths that don't exist raise an exception in strict mode. - """ - tempdir = tempfile.mkdtemp() - - missing_path = os.path.join(here, "missing-path.ini") - manifest = TestManifest(manifests=(missing_path,), strict=True) - self.assertRaises(IOError, manifest.active_tests) - self.assertRaises(IOError, manifest.copy, tempdir) - self.assertRaises(IOError, manifest.update, tempdir) - - shutil.rmtree(tempdir) - def test_missing_paths_toml(self): """ Test paths that don't exist raise an exception in strict mode. (TOML) @@ -103,17 +60,6 @@ class TestTestManifest(unittest.TestCase): shutil.rmtree(tempdir) - def test_comments(self): - """ - ensure comments work, see - https://bugzilla.mozilla.org/show_bug.cgi?id=813674 - """ - comment_example = os.path.join(here, "comment-example.toml") - manifest = TestManifest(manifests=(comment_example,)) - self.assertEqual(len(manifest.tests), 8) - names = [i["name"] for i in manifest.tests] - self.assertFalse("test_0202_app_launch_apply_update_dirlocked.js" in names) - def test_comments_toml(self): """ ensure comments work, see @@ -126,40 +72,6 @@ class TestTestManifest(unittest.TestCase): names = [i["name"] for i in manifest.tests] self.assertFalse("test_0202_app_launch_apply_update_dirlocked.js" in names) - def test_manifest_subsuites(self): - """ - test subsuites and conditional subsuites - """ - relative_path = os.path.join(here, "subsuite.ini") - manifest = TestManifest(manifests=(relative_path,)) - info = {"foo": "bar"} - - # 6 tests total - tests = manifest.active_tests(exists=False, **info) - self.assertEqual(len(tests), 6) - - # only 3 tests for subsuite bar when foo==bar - tests = manifest.active_tests(exists=False, filters=[subsuite("bar")], **info) - self.assertEqual(len(tests), 3) - - # only 1 test for subsuite baz, regardless of conditions - other = {"something": "else"} - tests = manifest.active_tests(exists=False, filters=[subsuite("baz")], **info) - self.assertEqual(len(tests), 1) - tests = manifest.active_tests(exists=False, filters=[subsuite("baz")], **other) - self.assertEqual(len(tests), 1) - - # 4 tests match when the condition doesn't match (all tests except - # the unconditional subsuite) - info = {"foo": "blah"} - tests = manifest.active_tests(exists=False, filters=[subsuite()], **info) - self.assertEqual(len(tests), 5) - - # test for illegal subsuite value - manifest.tests[0]["subsuite"] = 'subsuite=bar,foo=="bar",type="nothing"' - with self.assertRaises(ParseError): - manifest.active_tests(exists=False, filters=[subsuite("foo")], **info) - def test_manifest_subsuites_toml(self): """ test subsuites and conditional subsuites (TOML) @@ -194,19 +106,6 @@ class TestTestManifest(unittest.TestCase): with self.assertRaises(ParseError): manifest.active_tests(exists=False, filters=[subsuite("foo")], **info) - def test_none_and_empty_manifest(self): - """ - Test TestManifest for None and empty manifest, see - https://bugzilla.mozilla.org/show_bug.cgi?id=1087682 - """ - none_manifest = TestManifest(manifests=None, strict=False) - self.assertEqual(len(none_manifest.test_paths()), 0) - self.assertEqual(len(none_manifest.active_tests()), 0) - - empty_manifest = TestManifest(manifests=[], strict=False) - self.assertEqual(len(empty_manifest.test_paths()), 0) - self.assertEqual(len(empty_manifest.active_tests()), 0) - def test_none_and_empty_manifest_toml(self): """ Test TestManifest for None and empty manifest, see diff --git a/testing/mozbase/moz.build b/testing/mozbase/moz.build index 280a800ea04a..8d44dbc852d5 100644 --- a/testing/mozbase/moz.build +++ b/testing/mozbase/moz.build @@ -6,25 +6,25 @@ PYTHON_UNITTEST_MANIFESTS += [ "manifestparser/tests/manifest.toml", - "mozcrash/tests/manifest.ini", - "mozdebug/tests/manifest.ini", - "mozdevice/tests/manifest.ini", - "mozfile/tests/manifest.ini", - "mozgeckoprofiler/tests/manifest.ini", - "mozhttpd/tests/manifest.ini", - "mozinfo/tests/manifest.ini", - "mozinstall/tests/manifest.ini", - "mozleak/tests/manifest.ini", - "mozlog/tests/manifest.ini", - "moznetwork/tests/manifest.ini", - "mozpower/tests/manifest.ini", - "mozprocess/tests/manifest.ini", - "mozprofile/tests/manifest.ini", - "mozproxy/tests/manifest.ini", - "mozrunner/tests/manifest.ini", - "mozsystemmonitor/tests/manifest.ini", - "moztest/tests/manifest.ini", - "mozversion/tests/manifest.ini", + "mozcrash/tests/manifest.toml", + "mozdebug/tests/manifest.toml", + "mozdevice/tests/manifest.toml", + "mozfile/tests/manifest.toml", + "mozgeckoprofiler/tests/manifest.toml", + "mozhttpd/tests/manifest.toml", + "mozinfo/tests/manifest.toml", + "mozinstall/tests/manifest.toml", + "mozleak/tests/manifest.toml", + "mozlog/tests/manifest.toml", + "moznetwork/tests/manifest.toml", + "mozpower/tests/manifest.toml", + "mozprocess/tests/manifest.toml", + "mozprofile/tests/manifest.toml", + "mozproxy/tests/manifest.toml", + "mozrunner/tests/manifest.toml", + "mozsystemmonitor/tests/manifest.toml", + "moztest/tests/manifest.toml", + "mozversion/tests/manifest.toml", ] python_modules = [ diff --git a/testing/mozbase/mozcrash/tests/manifest.ini b/testing/mozbase/mozcrash/tests/manifest.ini deleted file mode 100644 index 5a7e75b83265..000000000000 --- a/testing/mozbase/mozcrash/tests/manifest.ini +++ /dev/null @@ -1,7 +0,0 @@ -[DEFAULT] -subsuite = mozbase -[test_basic.py] -[test_java_exception.py] -[test_save_path.py] -[test_stackwalk.py] -[test_symbols_path.py] diff --git a/testing/mozbase/mozcrash/tests/manifest.toml b/testing/mozbase/mozcrash/tests/manifest.toml new file mode 100644 index 000000000000..20e31fbc9de3 --- /dev/null +++ b/testing/mozbase/mozcrash/tests/manifest.toml @@ -0,0 +1,12 @@ +[DEFAULT] +subsuite = "mozbase" + +["test_basic.py"] + +["test_java_exception.py"] + +["test_save_path.py"] + +["test_stackwalk.py"] + +["test_symbols_path.py"] diff --git a/testing/mozbase/mozdebug/tests/manifest.ini b/testing/mozbase/mozdebug/tests/manifest.ini deleted file mode 100644 index 72aff7539a2a..000000000000 --- a/testing/mozbase/mozdebug/tests/manifest.ini +++ /dev/null @@ -1,3 +0,0 @@ -[DEFAULT] -subsuite = mozbase -[test.py] diff --git a/testing/mozbase/mozdebug/tests/manifest.toml b/testing/mozbase/mozdebug/tests/manifest.toml new file mode 100644 index 000000000000..147e23872ecc --- /dev/null +++ b/testing/mozbase/mozdebug/tests/manifest.toml @@ -0,0 +1,4 @@ +[DEFAULT] +subsuite = "mozbase" + +["test.py"] diff --git a/testing/mozbase/mozdevice/tests/manifest.ini b/testing/mozbase/mozdevice/tests/manifest.ini deleted file mode 100644 index 208fd06608d6..000000000000 --- a/testing/mozbase/mozdevice/tests/manifest.ini +++ /dev/null @@ -1,6 +0,0 @@ -[DEFAULT] -subsuite = mozbase -[test_socket_connection.py] -[test_is_app_installed.py] -[test_chown.py] -[test_escape_command_line.py] diff --git a/testing/mozbase/mozdevice/tests/manifest.toml b/testing/mozbase/mozdevice/tests/manifest.toml new file mode 100644 index 000000000000..22b338ca95d0 --- /dev/null +++ b/testing/mozbase/mozdevice/tests/manifest.toml @@ -0,0 +1,10 @@ +[DEFAULT] +subsuite = "mozbase" + +["test_chown.py"] + +["test_escape_command_line.py"] + +["test_is_app_installed.py"] + +["test_socket_connection.py"] diff --git a/testing/mozbase/mozfile/tests/manifest.ini b/testing/mozbase/mozfile/tests/manifest.ini deleted file mode 100644 index 258034bef55d..000000000000 --- a/testing/mozbase/mozfile/tests/manifest.ini +++ /dev/null @@ -1,10 +0,0 @@ -[DEFAULT] -subsuite = mozbase -[test_extract.py] -[test_load.py] -[test_move_remove.py] -[test_tempdir.py] -[test_tempfile.py] -[test_tree.py] -[test_url.py] -[test_which.py] diff --git a/testing/mozbase/mozfile/tests/manifest.toml b/testing/mozbase/mozfile/tests/manifest.toml new file mode 100644 index 000000000000..643b9c4c6e5d --- /dev/null +++ b/testing/mozbase/mozfile/tests/manifest.toml @@ -0,0 +1,18 @@ +[DEFAULT] +subsuite = "mozbase" + +["test_extract.py"] + +["test_load.py"] + +["test_move_remove.py"] + +["test_tempdir.py"] + +["test_tempfile.py"] + +["test_tree.py"] + +["test_url.py"] + +["test_which.py"] diff --git a/testing/mozbase/mozgeckoprofiler/tests/manifest.ini b/testing/mozbase/mozgeckoprofiler/tests/manifest.ini deleted file mode 100644 index e3f7083bb026..000000000000 --- a/testing/mozbase/mozgeckoprofiler/tests/manifest.ini +++ /dev/null @@ -1,3 +0,0 @@ -[DEFAULT] -subsuite = mozbase -[test_view_gecko_profiler.py] diff --git a/testing/mozbase/mozgeckoprofiler/tests/manifest.toml b/testing/mozbase/mozgeckoprofiler/tests/manifest.toml new file mode 100644 index 000000000000..95bae86eab70 --- /dev/null +++ b/testing/mozbase/mozgeckoprofiler/tests/manifest.toml @@ -0,0 +1,4 @@ +[DEFAULT] +subsuite = "mozbase" + +["test_view_gecko_profiler.py"] diff --git a/testing/mozbase/mozhttpd/tests/manifest.ini b/testing/mozbase/mozhttpd/tests/manifest.ini deleted file mode 100644 index dde73a6963b8..000000000000 --- a/testing/mozbase/mozhttpd/tests/manifest.ini +++ /dev/null @@ -1,10 +0,0 @@ -[DEFAULT] -subsuite = mozbase -[api.py] -skip-if = python == 3 -[baseurl.py] -[basic.py] -[filelisting.py] -skip-if = python == 3 -[paths.py] -[requestlog.py] diff --git a/testing/mozbase/mozhttpd/tests/manifest.toml b/testing/mozbase/mozhttpd/tests/manifest.toml new file mode 100644 index 000000000000..fcc902c73940 --- /dev/null +++ b/testing/mozbase/mozhttpd/tests/manifest.toml @@ -0,0 +1,16 @@ +[DEFAULT] +subsuite = "mozbase" + +["api.py"] +skip-if = true + +["baseurl.py"] + +["basic.py"] + +["filelisting.py"] +skip-if = true + +["paths.py"] + +["requestlog.py"] diff --git a/testing/mozbase/mozinfo/tests/manifest.ini b/testing/mozbase/mozinfo/tests/manifest.ini deleted file mode 100644 index 72aff7539a2a..000000000000 --- a/testing/mozbase/mozinfo/tests/manifest.ini +++ /dev/null @@ -1,3 +0,0 @@ -[DEFAULT] -subsuite = mozbase -[test.py] diff --git a/testing/mozbase/mozinfo/tests/manifest.toml b/testing/mozbase/mozinfo/tests/manifest.toml new file mode 100644 index 000000000000..147e23872ecc --- /dev/null +++ b/testing/mozbase/mozinfo/tests/manifest.toml @@ -0,0 +1,4 @@ +[DEFAULT] +subsuite = "mozbase" + +["test.py"] diff --git a/testing/mozbase/mozinstall/tests/manifest.ini b/testing/mozbase/mozinstall/tests/manifest.ini deleted file mode 100644 index d5e0d06976dd..000000000000 --- a/testing/mozbase/mozinstall/tests/manifest.ini +++ /dev/null @@ -1,8 +0,0 @@ -[DEFAULT] -subsuite = mozbase -[test_binary.py] -skip-if = os == 'mac' -[test_install.py] -skip-if = os == 'mac' # intermittent -[test_is_installer.py] -[test_uninstall.py] diff --git a/testing/mozbase/mozinstall/tests/manifest.toml b/testing/mozbase/mozinstall/tests/manifest.toml new file mode 100644 index 000000000000..43c0d29fdf80 --- /dev/null +++ b/testing/mozbase/mozinstall/tests/manifest.toml @@ -0,0 +1,12 @@ +[DEFAULT] +subsuite = "mozbase" + +["test_binary.py"] +skip-if = ["os == 'mac'"] + +["test_install.py"] +skip-if = ["os == 'mac'"] # intermittent + +["test_is_installer.py"] + +["test_uninstall.py"] diff --git a/testing/mozbase/mozleak/tests/manifest.ini b/testing/mozbase/mozleak/tests/manifest.ini deleted file mode 100644 index f15df4d06cd9..000000000000 --- a/testing/mozbase/mozleak/tests/manifest.ini +++ /dev/null @@ -1,4 +0,0 @@ -[DEFAULT] -subsuite = mozbase - -[test_lsan.py] diff --git a/testing/mozbase/mozleak/tests/manifest.toml b/testing/mozbase/mozleak/tests/manifest.toml new file mode 100644 index 000000000000..133b0581e6ae --- /dev/null +++ b/testing/mozbase/mozleak/tests/manifest.toml @@ -0,0 +1,4 @@ +[DEFAULT] +subsuite = "mozbase" + +["test_lsan.py"] diff --git a/testing/mozbase/mozlog/tests/manifest.ini b/testing/mozbase/mozlog/tests/manifest.ini deleted file mode 100644 index 23737ca46975..000000000000 --- a/testing/mozbase/mozlog/tests/manifest.ini +++ /dev/null @@ -1,9 +0,0 @@ -[DEFAULT] -subsuite = mozbase -[test_errorsummary.py] -[test_logger.py] -[test_logtypes.py] -[test_formatters.py] -[test_structured.py] -[test_terminal_colors.py] -[test_capture.py] diff --git a/testing/mozbase/mozlog/tests/manifest.toml b/testing/mozbase/mozlog/tests/manifest.toml new file mode 100644 index 000000000000..61545509658a --- /dev/null +++ b/testing/mozbase/mozlog/tests/manifest.toml @@ -0,0 +1,16 @@ +[DEFAULT] +subsuite = "mozbase" + +["test_capture.py"] + +["test_errorsummary.py"] + +["test_formatters.py"] + +["test_logger.py"] + +["test_logtypes.py"] + +["test_structured.py"] + +["test_terminal_colors.py"] diff --git a/testing/mozbase/moznetwork/tests/manifest.ini b/testing/mozbase/moznetwork/tests/manifest.ini deleted file mode 100644 index 8057892c67bb..000000000000 --- a/testing/mozbase/moznetwork/tests/manifest.ini +++ /dev/null @@ -1,3 +0,0 @@ -[DEFAULT] -subsuite = mozbase -[test_moznetwork.py] diff --git a/testing/mozbase/moznetwork/tests/manifest.toml b/testing/mozbase/moznetwork/tests/manifest.toml new file mode 100644 index 000000000000..6a2d385c92c8 --- /dev/null +++ b/testing/mozbase/moznetwork/tests/manifest.toml @@ -0,0 +1,4 @@ +[DEFAULT] +subsuite = "mozbase" + +["test_moznetwork.py"] diff --git a/testing/mozbase/mozpower/tests/manifest.ini b/testing/mozbase/mozpower/tests/manifest.ini deleted file mode 100644 index 2e825e2fa515..000000000000 --- a/testing/mozbase/mozpower/tests/manifest.ini +++ /dev/null @@ -1,6 +0,0 @@ -[DEFAULT] -subsuite = mozbase -[test_powerbase.py] -[test_intelpowergadget.py] -[test_macintelpower.py] -[test_mozpower.py] diff --git a/testing/mozbase/mozpower/tests/manifest.toml b/testing/mozbase/mozpower/tests/manifest.toml new file mode 100644 index 000000000000..d674f14ee671 --- /dev/null +++ b/testing/mozbase/mozpower/tests/manifest.toml @@ -0,0 +1,10 @@ +[DEFAULT] +subsuite = "mozbase" + +["test_intelpowergadget.py"] + +["test_macintelpower.py"] + +["test_mozpower.py"] + +["test_powerbase.py"] diff --git a/testing/mozbase/mozprocess/tests/manifest.ini b/testing/mozbase/mozprocess/tests/manifest.ini deleted file mode 100644 index aac171f1c4c7..000000000000 --- a/testing/mozbase/mozprocess/tests/manifest.ini +++ /dev/null @@ -1,13 +0,0 @@ -[DEFAULT] -subsuite = mozbase -[test_detached.py] -skip-if = os == 'win' # Bug 1493796 -[test_kill.py] -[test_misc.py] -[test_pid.py] -[test_poll.py] -[test_wait.py] -[test_output.py] -[test_params.py] -[test_process_reader.py] -[test_run_and_wait.py] diff --git a/testing/mozbase/mozprocess/tests/manifest.toml b/testing/mozbase/mozprocess/tests/manifest.toml new file mode 100644 index 000000000000..f8d2d63c4e1a --- /dev/null +++ b/testing/mozbase/mozprocess/tests/manifest.toml @@ -0,0 +1,23 @@ +[DEFAULT] +subsuite = "mozbase" + +["test_detached.py"] +skip-if = ["os == 'win'"] # Bug 1493796 + +["test_kill.py"] + +["test_misc.py"] + +["test_output.py"] + +["test_params.py"] + +["test_pid.py"] + +["test_poll.py"] + +["test_process_reader.py"] + +["test_run_and_wait.py"] + +["test_wait.py"] diff --git a/testing/mozbase/mozprofile/tests/manifest.ini b/testing/mozbase/mozprofile/tests/manifest.ini deleted file mode 100644 index d69f4649cea2..000000000000 --- a/testing/mozbase/mozprofile/tests/manifest.ini +++ /dev/null @@ -1,13 +0,0 @@ -[DEFAULT] -subsuite = mozbase -[test_addonid.py] -[test_server_locations.py] -[test_preferences.py] -[test_permissions.py] -[test_bug758250.py] -[test_nonce.py] -[test_clone_cleanup.py] -[test_profile.py] -[test_profile_view.py] -[test_addons.py] -[test_chrome_profile.py] diff --git a/testing/mozbase/mozprofile/tests/manifest.toml b/testing/mozbase/mozprofile/tests/manifest.toml new file mode 100644 index 000000000000..1f5b90914af5 --- /dev/null +++ b/testing/mozbase/mozprofile/tests/manifest.toml @@ -0,0 +1,24 @@ +[DEFAULT] +subsuite = "mozbase" + +["test_addonid.py"] + +["test_addons.py"] + +["test_bug758250.py"] + +["test_chrome_profile.py"] + +["test_clone_cleanup.py"] + +["test_nonce.py"] + +["test_permissions.py"] + +["test_preferences.py"] + +["test_profile.py"] + +["test_profile_view.py"] + +["test_server_locations.py"] diff --git a/testing/mozbase/mozproxy/tests/manifest.ini b/testing/mozbase/mozproxy/tests/manifest.ini deleted file mode 100644 index 51817ac77a26..000000000000 --- a/testing/mozbase/mozproxy/tests/manifest.ini +++ /dev/null @@ -1,10 +0,0 @@ -[DEFAULT] -subsuite = mozbase -[test_proxy.py] -[test_utils.py] -[test_command_line.py] -run-if = python == 3 # The mozproxy command line interface is designed to run on Python 3. -[test_recordings.py] -[test_recording.py] -[test_mitm_addons.py] -run-if = python == 3 # The mitm addons are designed to run on Python 3. diff --git a/testing/mozbase/mozproxy/tests/manifest.toml b/testing/mozbase/mozproxy/tests/manifest.toml new file mode 100644 index 000000000000..f0a081dee4c2 --- /dev/null +++ b/testing/mozbase/mozproxy/tests/manifest.toml @@ -0,0 +1,16 @@ +[DEFAULT] +subsuite = "mozbase" + +["test_command_line.py"] +run-if = ["python == 3"] # The mozproxy command line interface is designed to run on Python 3. + +["test_mitm_addons.py"] +run-if = ["python == 3"] # The mitm addons are designed to run on Python 3. + +["test_proxy.py"] + +["test_recording.py"] + +["test_recordings.py"] + +["test_utils.py"] diff --git a/testing/mozbase/mozrunner/tests/manifest.ini b/testing/mozbase/mozrunner/tests/manifest.ini deleted file mode 100644 index 7348004fdf32..000000000000 --- a/testing/mozbase/mozrunner/tests/manifest.ini +++ /dev/null @@ -1,12 +0,0 @@ -[DEFAULT] -subsuite = mozbase -# We skip these tests in automated Windows builds because they trigger crashes -# in sh.exe; see bug 1489277. -skip-if = automation && os == 'win' -[test_crash.py] -[test_interactive.py] -[test_start.py] -[test_states.py] -[test_stop.py] -[test_threads.py] -[test_wait.py] diff --git a/testing/mozbase/mozrunner/tests/manifest.toml b/testing/mozbase/mozrunner/tests/manifest.toml new file mode 100644 index 000000000000..2adf8ddcf22b --- /dev/null +++ b/testing/mozbase/mozrunner/tests/manifest.toml @@ -0,0 +1,19 @@ +[DEFAULT] +subsuite = "mozbase" +# We skip these tests in automated Windows builds because they trigger crashes +# in sh.exe; see bug 1489277. +skip-if = ["automation && os == 'win'"] + +["test_crash.py"] + +["test_interactive.py"] + +["test_start.py"] + +["test_states.py"] + +["test_stop.py"] + +["test_threads.py"] + +["test_wait.py"] diff --git a/testing/mozbase/mozsystemmonitor/tests/manifest.ini b/testing/mozbase/mozsystemmonitor/tests/manifest.ini deleted file mode 100644 index 4e265d757039..000000000000 --- a/testing/mozbase/mozsystemmonitor/tests/manifest.ini +++ /dev/null @@ -1,3 +0,0 @@ -[DEFAULT] -subsuite = mozbase -[test_resource_monitor.py] diff --git a/testing/mozbase/mozsystemmonitor/tests/manifest.toml b/testing/mozbase/mozsystemmonitor/tests/manifest.toml new file mode 100644 index 000000000000..babb20c1b053 --- /dev/null +++ b/testing/mozbase/mozsystemmonitor/tests/manifest.toml @@ -0,0 +1,4 @@ +[DEFAULT] +subsuite = "mozbase" + +["test_resource_monitor.py"] diff --git a/testing/mozbase/moztest/tests/data/srcdir/fig/grape/instrumentation.ini b/testing/mozbase/moztest/tests/data/srcdir/fig/grape/instrumentation.ini deleted file mode 100644 index ac567351e0b6..000000000000 --- a/testing/mozbase/moztest/tests/data/srcdir/fig/grape/instrumentation.ini +++ /dev/null @@ -1,2 +0,0 @@ -[src/TestInstrumentationA.java] -subsuite=background diff --git a/testing/mozbase/moztest/tests/data/srcdir/fig/grape/instrumentation.toml b/testing/mozbase/moztest/tests/data/srcdir/fig/grape/instrumentation.toml new file mode 100644 index 000000000000..3794aad26a6a --- /dev/null +++ b/testing/mozbase/moztest/tests/data/srcdir/fig/grape/instrumentation.toml @@ -0,0 +1,4 @@ +[DEFAULT] + +["src/TestInstrumentationA.java"] +subsuite = "background" diff --git a/testing/mozbase/moztest/tests/data/srcdir/fig/huckleberry/instrumentation.ini b/testing/mozbase/moztest/tests/data/srcdir/fig/huckleberry/instrumentation.ini deleted file mode 100644 index 043752dd8941..000000000000 --- a/testing/mozbase/moztest/tests/data/srcdir/fig/huckleberry/instrumentation.ini +++ /dev/null @@ -1,2 +0,0 @@ -[src/TestInstrumentationB.java] -subsuite=browser diff --git a/testing/mozbase/moztest/tests/data/srcdir/fig/huckleberry/instrumentation.toml b/testing/mozbase/moztest/tests/data/srcdir/fig/huckleberry/instrumentation.toml new file mode 100644 index 000000000000..b61d8a247aca --- /dev/null +++ b/testing/mozbase/moztest/tests/data/srcdir/fig/huckleberry/instrumentation.toml @@ -0,0 +1,4 @@ +[DEFAULT] + +["src/TestInstrumentationB.java"] +subsuite = "browser" diff --git a/testing/mozbase/moztest/tests/data/srcdir/fig/moz.build b/testing/mozbase/moztest/tests/data/srcdir/fig/moz.build index 34abb7dd8cb3..8f46de2e3572 100644 --- a/testing/mozbase/moztest/tests/data/srcdir/fig/moz.build +++ b/testing/mozbase/moztest/tests/data/srcdir/fig/moz.build @@ -1,4 +1,4 @@ ANDROID_INSTRUMENTATION_MANIFESTS += [ - "grape/instrumentation.ini", - "huckleberry/instrumentation.ini", + "grape/instrumentation.toml", + "huckleberry/instrumentation.toml", ] diff --git a/testing/mozbase/moztest/tests/manifest.ini b/testing/mozbase/moztest/tests/manifest.ini deleted file mode 100644 index 292bb99adb0c..000000000000 --- a/testing/mozbase/moztest/tests/manifest.ini +++ /dev/null @@ -1,6 +0,0 @@ -[DEFAULT] -subsuite = mozbase - -[test.py] -[test_resolve.py] - diff --git a/testing/mozbase/moztest/tests/manifest.toml b/testing/mozbase/moztest/tests/manifest.toml new file mode 100644 index 000000000000..99ceab929ff4 --- /dev/null +++ b/testing/mozbase/moztest/tests/manifest.toml @@ -0,0 +1,6 @@ +[DEFAULT] +subsuite = "mozbase" + +["test.py"] + +["test_resolve.py"] diff --git a/testing/mozbase/mozversion/tests/manifest.ini b/testing/mozbase/mozversion/tests/manifest.ini deleted file mode 100644 index 28936e5c2342..000000000000 --- a/testing/mozbase/mozversion/tests/manifest.ini +++ /dev/null @@ -1,5 +0,0 @@ -[DEFAULT] -subsuite = mozbase - -[test_binary.py] -[test_apk.py] diff --git a/testing/mozbase/mozversion/tests/manifest.toml b/testing/mozbase/mozversion/tests/manifest.toml new file mode 100644 index 000000000000..fb6c062fcffb --- /dev/null +++ b/testing/mozbase/mozversion/tests/manifest.toml @@ -0,0 +1,6 @@ +[DEFAULT] +subsuite = "mozbase" + +["test_apk.py"] + +["test_binary.py"] diff --git a/testing/mozharness/configs/android/android_common.py b/testing/mozharness/configs/android/android_common.py index 23d93e773644..9d02fde314fa 100644 --- a/testing/mozharness/configs/android/android_common.py +++ b/testing/mozharness/configs/android/android_common.py @@ -276,7 +276,7 @@ config = { "--apk=%(installer_path)s", "--no-logfiles", "--symbols-path=%(symbols_path)s", - "--manifest=tests/xpcshell.ini", + "--manifest=tests/xpcshell.toml", "--log-errorsummary=%(error_summary_file)s", "--log-tbpl-level=%(log_tbpl_level)s", "--threads=4", diff --git a/testing/mozharness/configs/unittests/linux_unittest.py b/testing/mozharness/configs/unittests/linux_unittest.py index e73a569d5e06..659928024ad7 100644 --- a/testing/mozharness/configs/unittests/linux_unittest.py +++ b/testing/mozharness/configs/unittests/linux_unittest.py @@ -231,7 +231,7 @@ config = { "options": [ "--xpcshell=%(abs_app_dir)s/" + XPCSHELL_NAME, "--http3server=%(abs_app_dir)s/" + HTTP3SERVER_NAME, - "--manifest=tests/xpcshell/tests/xpcshell.ini", + "--manifest=tests/xpcshell/tests/xpcshell.toml", ], "tests": [], }, @@ -239,7 +239,7 @@ config = { "options": [ "--xpcshell=%(abs_app_dir)s/" + XPCSHELL_NAME, "--http3server=%(abs_app_dir)s/" + HTTP3SERVER_NAME, - "--manifest=tests/xpcshell/tests/xpcshell.ini", + "--manifest=tests/xpcshell/tests/xpcshell.toml", "--sequential", ], "tests": [], diff --git a/testing/mozharness/configs/unittests/mac_unittest.py b/testing/mozharness/configs/unittests/mac_unittest.py index 72e1246722da..79bc1271633c 100644 --- a/testing/mozharness/configs/unittests/mac_unittest.py +++ b/testing/mozharness/configs/unittests/mac_unittest.py @@ -168,7 +168,7 @@ config = { "options": [ "--xpcshell=%(abs_app_dir)s/" + XPCSHELL_NAME, "--http3server=%(abs_app_dir)s/" + HTTP3SERVER_NAME, - "--manifest=tests/xpcshell/tests/xpcshell.ini", + "--manifest=tests/xpcshell/tests/xpcshell.toml", ], "tests": [], }, diff --git a/testing/mozharness/configs/unittests/win_unittest.py b/testing/mozharness/configs/unittests/win_unittest.py index 24b9aca53456..d7ef61c7ea0b 100644 --- a/testing/mozharness/configs/unittests/win_unittest.py +++ b/testing/mozharness/configs/unittests/win_unittest.py @@ -126,7 +126,7 @@ config = { "--symbols-path=%(symbols_path)s", "--log-errorsummary=%(error_summary_file)s", "--utility-path=tests/bin", - "--manifest=tests/xpcshell/tests/xpcshell.ini", + "--manifest=tests/xpcshell/tests/xpcshell.toml", ], "run_filename": "runxpcshelltests.py", "testsdir": "xpcshell", diff --git a/testing/mozharness/mozharness/mozilla/testing/per_test_base.py b/testing/mozharness/mozharness/mozilla/testing/per_test_base.py index fb5eda2b9132..d12f0ea97f40 100644 --- a/testing/mozharness/mozharness/mozilla/testing/per_test_base.py +++ b/testing/mozharness/mozharness/mozilla/testing/per_test_base.py @@ -43,25 +43,25 @@ class SingleTestMixin(object): def _find_misc_tests(self, dirs, changed_files, gpu=False): manifests = [ ( - os.path.join(dirs["abs_mochitest_dir"], "tests", "mochitest.ini"), + os.path.join(dirs["abs_mochitest_dir"], "tests", "mochitest.toml"), "mochitest-plain", ), ( - os.path.join(dirs["abs_mochitest_dir"], "chrome", "chrome.ini"), + os.path.join(dirs["abs_mochitest_dir"], "chrome", "chrome.toml"), "mochitest-chrome", ), ( os.path.join( - dirs["abs_mochitest_dir"], "browser", "browser-chrome.ini" + dirs["abs_mochitest_dir"], "browser", "browser-chrome.toml" ), "mochitest-browser-chrome", ), ( - os.path.join(dirs["abs_mochitest_dir"], "a11y", "a11y.ini"), + os.path.join(dirs["abs_mochitest_dir"], "a11y", "a11y.toml"), "mochitest-a11y", ), ( - os.path.join(dirs["abs_xpcshell_dir"], "tests", "xpcshell.ini"), + os.path.join(dirs["abs_xpcshell_dir"], "tests", "xpcshell.toml"), "xpcshell", ), ] diff --git a/tools/esmify/mach_commands.py b/tools/esmify/mach_commands.py index 607e5bb80135..7b72c7b0e3ad 100644 --- a/tools/esmify/mach_commands.py +++ b/tools/esmify/mach_commands.py @@ -666,14 +666,14 @@ def rename_single_file(command_context, vcs_utils, jsm_path, summary): ".eslintignore", "moz.build", "jar.mn", - "browser.ini", - "browser-common.ini", - "chrome.ini", - "mochitest.ini", - "xpcshell.ini", - "xpcshell-child-process.ini", - "xpcshell-common.ini", - "xpcshell-parent-process.ini", + "browser.toml", + "browser-common.toml", + "chrome.toml", + "mochitest.toml", + "xpcshell.toml", + "xpcshell-child-process.toml", + "xpcshell-common.toml", + "xpcshell-parent-process.toml", pathlib.Path("tools", "lint", "eslint.yml"), pathlib.Path("tools", "lint", "rejected-words.yml"), ]