tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit f3d29c586150a019fa9ed3352a2111d52ee54fc5
parent e5393c9ac95dba9373b3a2466c78bedf28161f29
Author: Tom Marble <tmarble@info9.net>
Date:   Fri,  5 Dec 2025 19:10:19 +0000

Bug 2003869 - update test manifests to use idiomatic conditions r=ahal,devtools-reviewers,toolkit-telemetry-reviewers,Sasha

Signed-off-by: Tom Marble <tmarble@info9.net>

Differential Revision: https://phabricator.services.mozilla.com/D275216

Diffstat:
Mbrowser/base/content/test/webrtc/browser.toml | 15+++++++--------
Mdevtools/client/responsive/test/browser/browser.toml | 2+-
Mdom/canvas/test/webgl-conf/generated-mochitest.toml | 1-
Mdom/canvas/test/webgl-conf/mochitest-errata.toml | 1-
Mdom/html/test/browser.toml | 5++++-
Mdom/security/test/general/browser.toml | 6+++++-
Msecurity/manager/ssl/tests/unit/xpcshell.toml | 2+-
Msecurity/sandbox/test/browser_xdg_default.toml | 4+++-
Msecurity/sandbox/test/browser_xdg_mozLegacyHome.toml | 4+++-
Mservices/crypto/tests/unit/xpcshell.toml | 4++--
Mtesting/cppunittest.toml | 101+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------
Mtesting/manifest/test/data/browser-known.toml | 4+++-
Mtesting/manifest/test/data/browser-new.toml | 8++++++--
Mtesting/marionette/harness/marionette_harness/tests/unit/unit-tests.toml | 31++++++++++++++++++++++---------
Mtesting/mozbase/manifestparser/manifestparser/toml.py | 26+++++---------------------
Mtesting/mozbase/manifestparser/tests/remove-manifest-after1.toml | 8++++++--
Mtesting/mozbase/manifestparser/tests/remove-manifest-after2.toml | 12++++++++----
Mtesting/mozbase/manifestparser/tests/remove-manifest-after3.toml | 12+++++++-----
Mtesting/mozbase/manifestparser/tests/remove-manifest-before.toml | 16+++++++++-------
Mtesting/mozbase/manifestparser/tests/test_manifestparser.py | 6+++---
Mtesting/mozbase/manifestparser/tests/test_toml.py | 46+++++++++++++++++++++++++++++++++++++++++++---
Mtoolkit/components/glean/tests/xpcshell/xpcshell.toml | 4++--
22 files changed, 216 insertions(+), 102 deletions(-)

diff --git a/browser/base/content/test/webrtc/browser.toml b/browser/base/content/test/webrtc/browser.toml @@ -27,14 +27,13 @@ skip-if = [ # "debug", # bug 1369731 # "os == 'linux' && os_version == '24.04' && asan", # Bug 1981050 # "os == 'linux' && os_version == '24.04' && tsan", # Bug 1981050 -# "os == 'linux' && os_version == '18.04' && processor == 'x86_64' && opt", # Bug 1775940 -# "os == 'linux' && os_version == '24.04' && processor == 'x86_64' && display == 'x11' && opt", # Bug 1775940 -# "os == 'mac' && os_version == '10.15' && processor == 'x86_64'", # platform migration +# "os == 'linux' && os_version == '24.04' && arch == 'x86_64' && display == 'x11' && opt", # Bug 1775940 +# "os == 'mac' && os_version == '10.15' && arch == 'x86_64'", # platform migration # "os == 'mac' && os_version == '11.20' && arch == 'aarch64'", # Bug 1707735 -# "os == 'mac' && os_version == '14.70' && processor == 'x86_64'", # Bug 1869787 +# "os == 'mac' && os_version == '14.70' && arch == 'x86_64'", # Bug 1869787 # "os == 'mac' && os_version == '15.30' && arch == 'aarch64'", # Bug 1707735 -# "os == 'win' && os_version == '11.26100' && processor == 'x86_64'", # Bug 1981050 -# "os == 'win' && os_version == '11.26100' && processor == 'x86'", # Bug 1981050 +# "os == 'win' && os_version == '11.26100' && arch == 'x86_64'", # Bug 1981050 +# "os == 'win' && os_version == '11.26100' && arch == 'x86'", # Bug 1981050 skip-if = [ "true", ] @@ -122,9 +121,9 @@ https_first_disabled = true # Simplified to "true".. previous bug tracking: # "os == 'linux'", # Bug 1503991 # "os == 'mac' && os_version == '11.20' && arch == 'aarch64'", # Bug 1707735 -# "os == 'mac' && os_version == '10.15' && processor == 'x86_64'", # platform migration +# "os == 'mac' && os_version == '10.15' && arch == 'x86_64'", # platform migration # "os == 'win'", # high frequency intermittent, bug 1739107 -# "os == 'mac' && os_version == '14.70' && processor == 'x86_64'", # Bug 1869787 +# "os == 'mac' && os_version == '14.70' && arch == 'x86_64'", # Bug 1869787 # "os == 'mac' && os_version == '15.30' && arch == 'aarch64'", # Bug 1707735 skip-if = [ "true", diff --git a/devtools/client/responsive/test/browser/browser.toml b/devtools/client/responsive/test/browser/browser.toml @@ -182,7 +182,7 @@ skip-if = [ "os == 'linux' && os_version == '24.04' && arch == 'x86_64' && display == 'x11' && debug", # Bug 1980013 "os == 'linux' && os_version == '24.04' && arch == 'x86_64' && display == 'x11' && tsan", # Bug 1980013 "os == 'mac' && os_version == '14.70' && arch == 'x86_64' && debug", # Bug 1980013 - "os == 'mac' && os_version == '14.70' && processor == 'x86_64' && verify", # can be too slow in chaos mode to trigger dblclick events + "os == 'mac' && os_version == '14.70' && arch == 'x86_64' && verify", # can be too slow in chaos mode to trigger dblclick events "os == 'win'", # Bug 1977557 and Bug 1977558 ] diff --git a/dom/canvas/test/webgl-conf/generated-mochitest.toml b/dom/canvas/test/webgl-conf/generated-mochitest.toml @@ -17638,7 +17638,6 @@ skip-if = [ ["generated/test_conformance__textures__misc__texture-npot-video.html"] subsuite = "webgl1-core" skip-if = [ - "win11_2009", # win11 - 50/50 intermittent "os == 'win' && os_version == '11.26100' && arch == 'x86_64'", # win11 - 50/50 intermittent "os == 'android' && os_version == '14' && arch == 'aarch64'", # Bug 1873144 ] diff --git a/dom/canvas/test/webgl-conf/mochitest-errata.toml b/dom/canvas/test/webgl-conf/mochitest-errata.toml @@ -2547,7 +2547,6 @@ skip-if = [ ["generated/test_conformance__textures__misc__texture-npot-video.html"] skip-if = [ - "win11_2009", # win11 - 50/50 intermittent "os == 'win' && os_version == '11.26100' && arch == 'x86_64'", # win11 - 50/50 intermittent "os == 'android' && os_version == '14' && arch == 'aarch64'", # Bug 1873144 ] diff --git a/dom/html/test/browser.toml b/dom/html/test/browser.toml @@ -13,7 +13,10 @@ support-files = [ ["browser_DOMDocElementInserted.js"] skip-if = [ - "arch == 'x86_64' && (os == 'mac' || os == 'linux')", # Bug 1646862 + "os == 'linux' && os_version == '22.04' && arch == 'x86_64' && display == 'wayland'", # Bug 1646862 + "os == 'linux' && os_version == '24.04' && arch == 'x86_64' && display == 'x11'", # Bug 1646862 + "os == 'mac' && os_version == '10.15' && arch == 'x86_64'", # Bug 1646862 + "os == 'mac' && os_version == '14.70' && arch == 'x86_64'", # Bug 1646862 ] ["browser_ImageDocument_svg_zoom.js"] diff --git a/dom/security/test/general/browser.toml b/dom/security/test/general/browser.toml @@ -69,7 +69,11 @@ support-files = [ ["browser_test_toplevel_data_navigations.js"] skip-if = [ - "debug && (os == 'mac' || os == 'linux')", # Bug 1403815 + "os == 'linux' && os_version == '22.04' && arch == 'x86_64' && display == 'wayland' && debug", # Bug 1403815 + "os == 'linux' && os_version == '24.04' && arch == 'x86_64' && display == 'x11' && debug", # Bug 1403815 + "os == 'mac' && os_version == '10.15' && arch == 'x86_64' && debug", # Bug 1403815 + "os == 'mac' && os_version == '14.70' && arch == 'x86_64' && debug", # Bug 1403815 + "os == 'mac' && os_version == '15.30' && arch == 'aarch64' && debug", # Bug 1403815 ] support-files = [ "file_toplevel_data_navigations.sjs", diff --git a/security/manager/ssl/tests/unit/xpcshell.toml b/security/manager/ssl/tests/unit/xpcshell.toml @@ -360,7 +360,7 @@ firefox-appdir = "browser" skip-if = [ "appname == 'thunderbird'", # browser/modules/Sanitizer.sys.mjs used by the test isn't available in Thunderbird. "os == 'android'", # Sanitization works differently on Android - this doesn't apply. - "os == 'win' && os_version == '11.26100' && processor == 'x86_64' && opt", # Bug 1839376 + "os == 'win' && os_version == '11.26100' && arch == 'x86_64' && opt", # Bug 1839376 ] ["test_sss_sanitizeOnShutdown_v2.js"] diff --git a/security/sandbox/test/browser_xdg_default.toml b/security/sandbox/test/browser_xdg_default.toml @@ -3,7 +3,9 @@ [DEFAULT] skip-if = [ "ccov", - "os == 'linux' && (asan || tsan)", # bug 1784517 + "os == 'linux' && os_version == '22.04' && arch == 'x86_64' && display == 'wayland' && asan", # bug 1784517 + "os == 'linux' && os_version == '24.04' && arch == 'x86_64' && display == 'x11' && asan", # bug 1784517 + "os == 'linux' && os_version == '24.04' && arch == 'x86_64' && display == 'x11' && tsan", # bug 1784517 ] tags = "contentsandbox" support-files = [ diff --git a/security/sandbox/test/browser_xdg_mozLegacyHome.toml b/security/sandbox/test/browser_xdg_mozLegacyHome.toml @@ -3,7 +3,9 @@ [DEFAULT] skip-if = [ "ccov", - "os == 'linux' && (asan || tsan)", # bug 1784517 + "os == 'linux' && os_version == '22.04' && arch == 'x86_64' && display == 'wayland' && asan", # bug 1784517 + "os == 'linux' && os_version == '24.04' && arch == 'x86_64' && display == 'x11' && asan", # bug 1784517 + "os == 'linux' && os_version == '24.04' && arch == 'x86_64' && display == 'x11' && tsan", # bug 1784517 ] tags = "contentsandbox" support-files = [ diff --git a/services/crypto/tests/unit/xpcshell.toml b/services/crypto/tests/unit/xpcshell.toml @@ -7,12 +7,12 @@ support-files = ["!/services/common/tests/unit/head_helpers.js"] ["test_crypto_random.js"] run-if = [ - "!appname == 'thunderbird'", + "appname != 'thunderbird'", ] ["test_jwcrypto.js"] run-if = [ - "!appname == 'thunderbird'", + "appname != 'thunderbird'", ] ["test_utils_hawk.js"] diff --git a/testing/cppunittest.toml b/testing/cppunittest.toml @@ -5,7 +5,9 @@ ["TestAlgorithm"] ["TestArm64Disassembler"] -run-if = ["os == 'win' && processor == 'aarch64'"] +run-if = [ + "os == 'win' && arch == 'aarch64'", +] ["TestArray"] @@ -16,7 +18,9 @@ run-if = ["os == 'win' && processor == 'aarch64'"] ["TestAtomics"] ["TestBaseProfiler"] -skip-if = ["tsan"] # Bug 1804081 +skip-if = [ + "tsan", # Bug 1804081 +] ["TestBinarySearch"] @@ -39,18 +43,26 @@ skip-if = ["tsan"] # Bug 1804081 ["TestCountZeroes"] ["TestCrossProcessWin"] -run-if = ["os == 'win'"] +run-if = [ + "os == 'win'", +] ["TestDefineEnum"] ["TestDllBlocklistAssumptions"] -run-if = ["os == 'win'"] +run-if = [ + "os == 'win'", +] ["TestDllInterceptor"] -run-if = ["os == 'win'"] +run-if = [ + "os == 'win'", +] ["TestDllInterceptorCrossProcess"] -run-if = ["os == 'win' && processor != 'aarch64'"] +run-if = [ + "os == 'win' && arch != 'aarch64'", +] ["TestDoublyLinkedList"] @@ -73,11 +85,13 @@ run-if = ["os == 'win' && processor != 'aarch64'"] ["TestHashTable"] ["TestIATPatcher"] -run-if = ["os == 'win'"] +run-if = [ + "os == 'win'", +] skip-if = [ - "processor == 'aarch64'", # requires administrator permission on aarch64 - "win11_2009 && bits == 32", # fails on windows10x32 - "os == 'win' && os_version == '11.26100' && processor == 'x86'", # fails on win/x86 + "os == 'android' && os_version == '14' && arch == 'aarch64'", # requires administrator permission on aarch64 + "os == 'mac' && os_version == '15.30' && arch == 'aarch64'", # requires administrator permission on aarch64 + "os == 'win' && os_version == '11.26100' && arch == 'x86'", # fails on win/x86 ] ["TestIntegerPrintfMacros"] @@ -87,12 +101,16 @@ skip-if = [ ["TestJSONWriter"] ["TestLauncherRegistryInfo"] -run-if = ["os == 'win'"] +run-if = [ + "os == 'win'", +] ["TestLinkedList"] ["TestMMPolicy"] -run-if = ["os == 'win'"] +run-if = [ + "os == 'win'", +] ["TestMacroArgs"] @@ -103,25 +121,42 @@ run-if = ["os == 'win'"] ["TestMaybe"] ["TestMemoryPressureWatcherLinux"] -run-if = ["os == 'linux'"] +run-if = [ + "os == 'linux'", +] ["TestMozCrash"] -skip-if = ["os != 'linux'", "asan"] +skip-if = [ + "asan", + "os == 'android' && os_version == '14' && arch == 'aarch64'", + "os == 'mac' && os_version == '10.15' && arch == 'x86_64'", + "os == 'mac' && os_version == '14.70' && arch == 'x86_64'", + "os == 'mac' && os_version == '15.30' && arch == 'aarch64'", + "os == 'win' && os_version == '10.2009' && arch == 'x86_64'", + "os == 'win' && os_version == '11.26100' && arch == 'x86'", + "os == 'win' && os_version == '11.26100' && arch == 'x86_64'", +] ["TestMozJemallocUtils"] ["TestNativeNt"] -run-if = ["os == 'win'"] +run-if = [ + "os == 'win'", +] ["TestNonDereferenceable"] ["TestNotNull"] ["TestOleAut32Initialization"] -run-if = ["os == 'win'"] +run-if = [ + "os == 'win'", +] ["TestPEExportSection"] -run-if = ["os == 'win'"] +run-if = [ + "os == 'win'", +] ["TestPoisonArea"] skip-if = [ @@ -148,10 +183,14 @@ skip-if = [ ["TestSPSCQueue"] ["TestSafeThreadLocal"] -run-if = ["os == 'win'"] +run-if = [ + "os == 'win'", +] ["TestSameBinary"] -run-if = ["os == 'win'"] +run-if = [ + "os == 'win'", +] ["TestSaturate"] @@ -160,31 +199,41 @@ run-if = ["os == 'win'"] ["TestSegmentedVector"] ["TestSharedMappingCommit"] -run-if = ["os == 'win'"] +run-if = [ + "os == 'win'", +] ["TestSmallPointerArray"] ["TestSplayTree"] ["TestStackCookie"] -run-if = ["os == 'win'"] +run-if = [ + "os == 'win'", +] ["TestStackWalkInitialization"] -run-if = ["os == 'win' && processor == 'x86_64'"] +run-if = [ + "os == 'win' && arch == 'x86_64'", +] ["TestTextUtils"] ["TestThreadSafeWeakPtr"] ["TestTimeStampWin"] -run-if = ["os == 'win'"] +run-if = [ + "os == 'win'", +] ["TestTypedEnum"] ["TestUniquePtr"] ["TestUriValidation"] -run-if = ["os == 'win'"] +run-if = [ + "os == 'win'", +] ["TestUtf8"] @@ -195,7 +244,9 @@ run-if = ["os == 'win'"] ["TestWeakPtr"] ["TestWinArchDefs"] -run-if = ["os == 'win'"] +run-if = [ + "os == 'win'", +] ["TestWrappingOperations"] diff --git a/testing/manifest/test/data/browser-known.toml b/testing/manifest/test/data/browser-known.toml @@ -11,4 +11,6 @@ skip-if = [ https_first_disabled = true ["browser_focus_document.js"] -skip-if = ["os == 'mac' && os_version == '15.30' && arch == 'aarch64' && opt"] # Bug 1962169 +skip-if = [ + "os == 'mac' && os_version == '15.30' && arch == 'aarch64' && opt", # Bug 1962169 +] diff --git a/testing/manifest/test/data/browser-new.toml b/testing/manifest/test/data/browser-new.toml @@ -9,7 +9,11 @@ skip-if = [ ["browser_cross_process_csp_inheritance.js"] https_first_disabled = true -skip-if = ["os == 'mac' && os_version == '15.30' && arch == 'aarch64' && opt"] # Bug TBD +skip-if = [ + "os == 'mac' && os_version == '15.30' && arch == 'aarch64' && opt", # Bug TBD +] ["browser_focus_document.js"] -skip-if = ["os == 'mac' && os_version == '15.30' && arch == 'aarch64' && opt"] # Bug 1962169 +skip-if = [ + "os == 'mac' && os_version == '15.30' && arch == 'aarch64' && opt", # Bug 1962169 +] diff --git a/testing/marionette/harness/marionette_harness/tests/unit/unit-tests.toml b/testing/marionette/harness/marionette_harness/tests/unit/unit-tests.toml @@ -55,7 +55,9 @@ ["test_chrome_window_type.py"] ["test_cli_arguments.py"] -skip-if = ["!manage_instance"] +skip-if = [ + "!manage_instance", +] ["test_click.py"] @@ -94,7 +96,9 @@ skip-if = ["asan", "!manage_instance"] expected = "fail" ["test_file_upload.py"] -skip-if = ["os == 'win'"] # http://bugs.python.org/issue14574 +skip-if = [ + "os == 'win'", # http://bugs.python.org/issue14574 +] ["test_findelement.py"] @@ -123,18 +127,26 @@ skip-if = ["os == 'win'"] # http://bugs.python.org/issue14574 ["test_prefs.py"] ["test_prefs_enforce.py"] -skip-if = ["!manage_instance"] +skip-if = [ + "!manage_instance", +] ["test_profile_management.py"] -skip-if = ["!manage_instance"] +skip-if = [ + "!manage_instance", +] ["test_proxy.py"] ["test_quit_restart.py"] -skip-if = ["!manage_instance"] +skip-if = [ + "!manage_instance", +] ["test_reftest.py"] -skip-if = ["os == 'mac'"] # bug 1674411 +skip-if = [ + "os == 'mac'", # bug 1674411 +] ["test_rendered_element.py"] @@ -180,11 +192,12 @@ skip-if = ["os == 'mac'"] # bug 1674411 ["test_window_rect.py"] skip-if = [ - "os == 'linux' && os_version == '18.04' && !swgl", # Bug 1709584 - "os == 'linux' && os_version == '24.04' && processor == 'x86_64' && display == 'x11'", # Bug 1709584 + "os == 'linux' && os_version == '24.04' && arch == 'x86_64' && display == 'x11'", # Bug 1709584 ] ["test_window_status.py"] ["test_windowless.py"] -run-if = ["os == 'mac'"] # only supported on MacOS +run-if = [ + "os == 'mac'", # only supported on MacOS +] diff --git a/testing/mozbase/manifestparser/manifestparser/toml.py b/testing/mozbase/manifestparser/manifestparser/toml.py @@ -889,13 +889,12 @@ def add_skip_if( mp_array: Array = array() if skip_if is None: # add the first one line entry to the table if mode != Mode.CARRYOVER: - mp_array.add_line(condition, indent="", add_comma=False, newline=False) if create_bug_lambda is not None: bug = create_bug_lambda() if bug is not None: bug_reference = f"Bug {bug.id}" - if bug_reference is not None: - mp_array.comment(bug_reference) + mp_array.add_line(condition, indent=" ", comment=bug_reference) + mp_array.add_line("", indent="") # fixed in write_toml_str skip_if = {"skip-if": mp_array} keyvals.update(skip_if) else: @@ -1034,25 +1033,10 @@ def remove_skip_if( has_removed_items = True if len(conditions_to_add) > 0: - # If there is only one condition, make the skip-if a one-liner - if len(conditions_to_add) > 1: - for condition, comment in conditions_to_add: - new_conditions.add_line( - condition, comment=comment, indent=" " - ) - else: - condition, comment = conditions_to_add[0] - new_conditions.add_line( - condition, indent="", add_comma=False, newline=False - ) - # Make sure the comment is added outside the array on one-liners - if comment is not None: - new_conditions.comment(comment) - - # Do not keep an empty skip-if array if there are no conditions + for condition, comment in conditions_to_add: + new_conditions.add_line(condition, comment=comment, indent=" ") if len(new_conditions) > 0: - if len(new_conditions) > 1: - new_conditions.add_line("", indent="") + new_conditions.add_line("", indent="") key_values.update({"skip-if": new_conditions}) else: del key_values["skip-if"] diff --git a/testing/mozbase/manifestparser/tests/remove-manifest-after1.toml b/testing/mozbase/manifestparser/tests/remove-manifest-after1.toml @@ -7,10 +7,14 @@ skip-if = [ ] ["test_remove_skip2.html"] -skip-if = ["os == 'macosx' && os_version == '14.70' && processor == 'x86'"] # Bug 333 +skip-if = [ + "os == 'mac' && os_version == '14.70' && arch == 'x86'", # Bug 333 +] ["test_remove_skip3.html"] other-key = "test" ["test_remove_skip4.html"] -skip-if = ["os == 'mac'"] # Bug 111 +skip-if = [ + "os == 'mac'", # Bug 111 +] diff --git a/testing/mozbase/manifestparser/tests/remove-manifest-after2.toml b/testing/mozbase/manifestparser/tests/remove-manifest-after2.toml @@ -9,13 +9,17 @@ skip-if = [ ["test_remove_skip2.html"] skip-if = [ - "os == 'macosx' && os_version == '14.70' && processor == 'x86'", # Bug 333 - "os == 'linux' && os_version == '22.04' && processor == 'x86'", # Bug 222 + "os == 'mac' && os_version == '14.70' && arch == 'x86'", # Bug 333 + "os == 'linux' && os_version == '24.04' && arch == 'x86'", # Bug 111 ] ["test_remove_skip3.html"] -skip-if = ["os == 'linux' && os_version == '22.04' && processor == 'x86' && debug"] # Bug 222 +skip-if = [ + "os == 'linux' && os_version == '24.04' && arch == 'x86' && debug", # Bug 333 +] other-key = "test" ["test_remove_skip4.html"] -skip-if = ["os == 'mac'"] # Bug 111 +skip-if = [ + "os == 'mac'", # Bug 111 +] diff --git a/testing/mozbase/manifestparser/tests/remove-manifest-after3.toml b/testing/mozbase/manifestparser/tests/remove-manifest-after3.toml @@ -9,16 +9,18 @@ skip-if = [ ["test_remove_skip2.html"] skip-if = [ - "os == 'macosx' && os_version == '14.70' && processor == 'x86'", # Bug 333 - "os == 'linux' && os_version == '22.04' && processor == 'x86'", # Bug 222 + "os == 'mac' && os_version == '14.70' && arch == 'x86'", # Bug 333 + "os == 'linux' && os_version == '24.04' && arch == 'x86'", # Bug 111 ] ["test_remove_skip3.html"] skip-if = [ - "os == 'linux' && os_version == '18.04' && processor == 'armv7'", # Bug 111 - "os == 'linux' && os_version == '22.04' && processor == 'x86' && debug", # Bug 222 + "os == 'linux' && os_version == '22.04' && arch == 'armv7'", # Bug 222 + "os == 'linux' && os_version == '24.04' && arch == 'x86' && debug", # Bug 333 ] other-key = "test" ["test_remove_skip4.html"] -skip-if = ["os == 'mac'"] # Bug 111 +skip-if = [ + "os == 'mac'", # Bug 111 +] diff --git a/testing/mozbase/manifestparser/tests/remove-manifest-before.toml b/testing/mozbase/manifestparser/tests/remove-manifest-before.toml @@ -9,18 +9,20 @@ skip-if = [ ["test_remove_skip2.html"] skip-if = [ - "os == 'macosx' && os_version == '14.70' && processor == 'x86'", # Bug 333 - "os == 'linux' && os_version == '18.04' && processor == 'x86'", # Bug 111 - "os == 'linux' && os_version == '22.04' && processor == 'x86'", # Bug 222 + "os == 'mac' && os_version == '14.70' && arch == 'x86'", # Bug 333 + "os == 'linux' && os_version == '22.04' && arch == 'x86'", # Bug 222 + "os == 'linux' && os_version == '24.04' && arch == 'x86'", # Bug 111 ] ["test_remove_skip3.html"] skip-if = [ - "os == 'linux' && os_version == '18.04' && processor == 'x86'", # Bug 111 - "os == 'linux' && os_version == '18.04' && processor == 'armv7'", # Bug 111 - "os == 'linux' && os_version == '22.04' && processor == 'x86' && debug", # Bug 222 + "os == 'linux' && os_version == '22.04' && arch == 'x86'", # Bug 111 + "os == 'linux' && os_version == '22.04' && arch == 'armv7'", # Bug 222 + "os == 'linux' && os_version == '24.04' && arch == 'x86' && debug", # Bug 333 ] other-key = "test" ["test_remove_skip4.html"] -skip-if = ["os == 'mac'"] # Bug 111 +skip-if = [ + "os == 'mac'", # Bug 111 +] diff --git a/testing/mozbase/manifestparser/tests/test_manifestparser.py b/testing/mozbase/manifestparser/tests/test_manifestparser.py @@ -667,7 +667,7 @@ yellow = submarine manifest = parser.source_documents[before_path] manifestparser.toml.remove_skip_if( - manifest, os_name="linux", os_version="18.04" + manifest, os_name="linux", os_version="22.04" ) manifest_str = manifestparser.toml.alphabetize_toml_str(manifest) @@ -680,7 +680,7 @@ yellow = submarine manifest = parser.source_documents[before_path] manifestparser.toml.remove_skip_if( - manifest, os_name="linux", os_version="18.04", processor="x86" + manifest, os_name="linux", os_version="22.04", processor="x86" ) manifest_str = manifestparser.toml.alphabetize_toml_str(manifest) @@ -693,7 +693,7 @@ yellow = submarine manifest = parser.source_documents[before_path] manifestparser.toml.remove_skip_if( - manifest, os_name="unknown", os_version="18.04", processor="x86" + manifest, os_name="unknown", os_version="22.04", processor="x86" ) manifest_str = manifestparser.toml.alphabetize_toml_str(manifest) diff --git a/testing/mozbase/manifestparser/tests/test_toml.py b/testing/mozbase/manifestparser/tests/test_toml.py @@ -9,12 +9,52 @@ import os import mozunit import pytest from manifestparser import ManifestParser -from manifestparser.toml import Carry, alphabetize_toml_str, replace_tbd_skip_if +from manifestparser.toml import ( + DEFAULT_SECTION, + Carry, + Mode, + add_skip_if, + alphabetize_toml_str, + replace_tbd_skip_if, +) from tomlkit.toml_document import TOMLDocument here = os.path.dirname(os.path.abspath(__file__)) +def test_add_skip_if(tmp_path): + parser = ManifestParser(use_toml=True, document=True) + filename = "aaa.js" + contents = f'[{DEFAULT_SECTION}]\n\n["{filename}"]' + manifest_path = tmp_path / "add_skip_if.toml" + manifest_path.write_text(contents) + parser.read(str(manifest_path)) + document = parser.source_documents[str(manifest_path)] + assert DEFAULT_SECTION in document + skip_if = "true" + bug_reference = "Bug 2003869" + additional_comment, carryover, bug_reference = add_skip_if( + document, + filename, + skip_if, + bug_reference, + None, + Mode.NORMAL, + ) + assert bug_reference is not None # skip-if should not be ignored + manifest_str = alphabetize_toml_str(document) + assert ( + manifest_str + == """[DEFAULT] + +["aaa.js"] +skip-if = [ + "true", # Bug 2003869 +] +""" + ) + + def test_replace_tbd_skip_if(): parser = ManifestParser(use_toml=True, document=True) before = "replace-tbd-before.toml" @@ -169,13 +209,13 @@ def carry(): (17, "os == 'win'", "tsan", False), ( 18, - "os == 'linux' && os_version == '18.04' && debug", + "os == 'linux' && os_version == '22.04' && debug", "os == 'linux' && os_version == '24.04' && asan && isolated_debug_process", False, ), ( 19, - "os == 'linux' && os_version == '18.04' && isolated_debug_process", + "os == 'linux' && os_version == '22.04' && isolated_debug_process", "os == 'linux' && os_version == '24.04' && opt", True, ), diff --git a/toolkit/components/glean/tests/xpcshell/xpcshell.toml b/toolkit/components/glean/tests/xpcshell/xpcshell.toml @@ -11,7 +11,7 @@ run-if = [ ["test_FOGInit.js"] run-if = [ - "!appname == 'thunderbird'", # Won't run on thunderbird due to a race condition with the generated serverknobs conf. + "appname != 'thunderbird'", # Won't run on thunderbird due to a race condition with the generated serverknobs conf. ] ["test_FOGPrefs.js"] @@ -52,7 +52,7 @@ run-if = [ "appname != 'thunderbird'", # interesting_serverknobs.json isn't applied before init. ] skip-if = [ - "os != 'android'", # Android inits its own FOG, so the test won't work. + "os == 'android'", # Android inits its own FOG, so the test won't work. ] ["test_OHTTP.js"]