mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1675319 - [manifestparser] Properly support multiline skip-if statements, r=jmaher,extension-reviewers,zombie
This supports one manifestparser expression per line in the 'skip-if', 'fail-if' and 'run-if' keys. As a side effect the: skip-if = foo || bar syntax is no longer supported. Instead it can be: skip-if = foo # bug 123 bar # bug 456 Differential Revision: https://phabricator.services.mozilla.com/D95927
This commit is contained in:
parent
f1c2e8e669
commit
331bc892dd
@ -280,8 +280,9 @@ tags = openUILinkIn
|
||||
[browser_send_async_message_oom.js]
|
||||
[browser_sessionStoreContainer.js]
|
||||
[browser_windowStateContainer.js]
|
||||
skip-if = (fission && (debug || os == "win")) || # Bug 1279821.
|
||||
os == "linux" && !debug
|
||||
skip-if =
|
||||
fission && (debug || os == "win") # Bug 1279821.
|
||||
os == "linux" && !debug
|
||||
[browser_1234021.js]
|
||||
[browser_remoteness_flip_on_restore.js]
|
||||
run-if = e10s
|
||||
|
@ -137,15 +137,27 @@ dupe-manifest
|
||||
|
||||
The value of this key is ignored.
|
||||
|
||||
|
||||
skip-if
|
||||
Skip this test if the specified condition is true.
|
||||
See :ref:`manifest_filter_language`.
|
||||
|
||||
Conditions can be specified on multiple lines, where each line is implicitly
|
||||
joined by a logical OR (``||``). This makes it easier to add comments to
|
||||
distinct failures. For example:
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
[test_foo.js]
|
||||
skip-if =
|
||||
os == "mac" && fission # bug 123 - fails on fission
|
||||
os == "windows" && debug # bug 456 - hits an assertion
|
||||
|
||||
fail-if
|
||||
Expect test failure if the specified condition is true.
|
||||
See :ref:`manifest_filter_language`.
|
||||
|
||||
Conditions can be specified on multiple lines (see ``skip-if``).
|
||||
|
||||
run-sequentially
|
||||
If present, the test should not be run in parallel with other tests.
|
||||
|
||||
|
@ -202,8 +202,8 @@ skip-if = verify
|
||||
[browser_require_raw.js]
|
||||
[browser_spectrum.js]
|
||||
skip-if =
|
||||
verify || # Bug 1478156 test verify fails on master
|
||||
fission && debug # Fails intermittently.
|
||||
verify # Bug 1478156 test verify fails on master
|
||||
fission && debug # Fails intermittently.
|
||||
[browser_theme.js]
|
||||
[browser_tableWidget_basic.js]
|
||||
[browser_tableWidget_keyboard_interaction.js]
|
||||
|
@ -85,8 +85,8 @@ support-files = file_bug1536471.html
|
||||
[test_popup-navigates-children.html]
|
||||
[test_reserved.html]
|
||||
skip-if =
|
||||
(debug && e10s) || # bug 1263213
|
||||
(os == 'mac' && os_version == '10.14') # Bug 1548821
|
||||
(debug && e10s) # bug 1263213
|
||||
(os == 'mac' && os_version == '10.14') # Bug 1548821
|
||||
[test_performance_navigation.html]
|
||||
skip-if = fission # bug 1666602
|
||||
[test_sessionhistory.html]
|
||||
|
@ -830,7 +830,8 @@ support-files =
|
||||
[test_window_proto.html]
|
||||
[test_writable-replaceable.html]
|
||||
[test_x-frame-options.html]
|
||||
skip-if = toolkit == 'android' && debug && !is_fennec
|
||||
|| xorigin # JavaScript error: http://mochi.test:8888/tests/dom/base/test/test_x-frame-options.html, line 48: TypeError: can't access property "textContent", this.content.document.getElementById(...) is null, JavaScript error: resource://gre/modules/ProcessSelector.jsm, line 56: TypeError: can't access property "tabCount", process is null
|
||||
skip-if =
|
||||
toolkit == 'android' && debug && !is_fennec
|
||||
xorigin # JavaScript error: http://mochi.test:8888/tests/dom/base/test/test_x-frame-options.html, line 48: TypeError: can't access property "textContent", this.content.document.getElementById(...) is null, JavaScript error: resource://gre/modules/ProcessSelector.jsm, line 56: TypeError: can't access property "tabCount", process is null
|
||||
[test_youtube_flash_embed.html]
|
||||
# Please keep alphabetical order.
|
||||
|
@ -121,8 +121,9 @@ support-files =
|
||||
[test_trigger_popup_by_pointer_events.html]
|
||||
[test_remove_frame_when_got_pointer_capture.html]
|
||||
[test_getCoalescedEvents.html]
|
||||
skip-if = !e10s || os == 'android' # Bug 1312791
|
||||
|| (verify && os == 'win') # Bug 1659744
|
||||
skip-if =
|
||||
!e10s || os == 'android' # Bug 1312791
|
||||
verify && os == 'win' # Bug 1659744
|
||||
[test_pointercapture_xorigin_iframe.html]
|
||||
support-files =
|
||||
file_pointercapture_xorigin_iframe.html
|
||||
|
@ -64,8 +64,9 @@ skip-if = !crashreporter
|
||||
[test_bug1092842.html]
|
||||
skip-if = (verify && (os == 'win')) || (os == "win" && webrender) # win/webrender bug 1296400
|
||||
[test_bug1165981.html]
|
||||
skip-if = (processor == 'aarch64' && os == 'win')
|
||||
|| (xorigin && !fission) # JavaScript error: test_bug1165981.html:line 51: TypeError: pluginElement.identifierToStringTest is not a function; this test incorrectly passes when fission is enabled because the permission is being checked for the frame site rather than the top-level site.
|
||||
skip-if =
|
||||
processor == 'aarch64' && os == 'win'
|
||||
xorigin && !fission # JavaScript error: test_bug1165981.html:line 51: TypeError: pluginElement.identifierToStringTest is not a function; this test incorrectly passes when fission is enabled because the permission is being checked for the frame site rather than the top-level site.
|
||||
reason = Plugins are not supported on Windows/AArch64
|
||||
[test_bug1245545.html]
|
||||
[test_bug1307694.html]
|
||||
|
@ -394,8 +394,8 @@ support-files =
|
||||
[test_reloadInFreshProcess.html]
|
||||
# no e10s-multi support on android and no large-allocation on win32
|
||||
skip-if =
|
||||
(toolkit == 'android') || (os == 'win' && bits == 32) ||
|
||||
fission # Large allocation processes don't work correctly under Fission.
|
||||
(toolkit == 'android') || (os == 'win' && bits == 32)
|
||||
fission # Large allocation processes don't work correctly under Fission.
|
||||
support-files =
|
||||
file_reloadInFreshProcess.sjs
|
||||
[test_parent_location_js.html]
|
||||
|
@ -22,12 +22,15 @@ support-files =
|
||||
|
||||
[test_main.html]
|
||||
skip-if =
|
||||
(toolkit == 'android') || webrender || (verify && !debug && (os == 'linux')) || # Android: TIMED_OUT; bug 1402554
|
||||
tsan # Times out / Memory consumption, bug 1612707
|
||||
toolkit == 'android' || webrender || (verify && !debug && os == 'linux') # Android: TIMED_OUT; bug 1402554
|
||||
tsan # Times out / Memory consumption, bug 1612707
|
||||
[test_bug803225.html]
|
||||
skip-if = (os=='linux' && bits==32) || headless || tsan # Linux32:bug 1324870; Headless:bug 1405870; tsan:bug 1612707
|
||||
[test_frameNavigation.html]
|
||||
fail-if = fission
|
||||
skip-if = webrender || (debug && (os == 'linux' || os == 'win')) || (os == 'win' && !debug) # webrender: bug 1424752 # Bug 1391823; Bug 1353608
|
||||
|| (xorigin && fission) # Application time out
|
||||
skip-if =
|
||||
webrender # Bug 1424752
|
||||
debug && (os == 'linux' || os == 'win') # Bug 1391823
|
||||
os == 'win' && !debug # Bug 1353608
|
||||
xorigin && fission # Application time out
|
||||
[test_redirect.html]
|
||||
|
@ -289,8 +289,9 @@ skip-if = serviceworker_e10s # leaks InterceptedHttpChannel and others things
|
||||
[test_notification_constructor_error.html]
|
||||
[test_notification_get.html]
|
||||
[test_notification_openWindow.html]
|
||||
skip-if = toolkit == 'android' && !is_fennec # Bug 1620052
|
||||
|| xorigin # JavaScript error: http://mochi.xorigin-test:8888/tests/SimpleTest/TestRunner.js, line 157: SecurityError: Permission denied to access property "wrappedJSObject" on cross-origin object
|
||||
skip-if =
|
||||
toolkit == 'android' && !is_fennec # Bug 1620052
|
||||
xorigin # JavaScript error: http://mochi.xorigin-test:8888/tests/SimpleTest/TestRunner.js, line 157: SecurityError: Permission denied to access property "wrappedJSObject" on cross-origin object
|
||||
support-files = notification_openWindow_worker.js file_notification_openWindow.html
|
||||
tags = openwindow
|
||||
[test_notificationclick.html]
|
||||
|
@ -66,8 +66,8 @@ skip-if = !e10s || verify # This is a test of e10s functionality.
|
||||
[browser_localStorage_snapshotting_e10s.js]
|
||||
fail-if = fission
|
||||
skip-if =
|
||||
!e10s || # This is a test of e10s functionality.
|
||||
(fission && debug) # Intermittently fails uncleanly and breaks subsequent tests.
|
||||
!e10s # This is a test of e10s functionality.
|
||||
(fission && debug) # Intermittently fails uncleanly and breaks subsequent tests.
|
||||
[browser_persist_cookies.js]
|
||||
support-files =
|
||||
set-samesite-cookies-and-redirect.sjs
|
||||
|
@ -39,5 +39,6 @@ skip-if = xorigin # Hangs
|
||||
[test_multiple_keys.html]
|
||||
skip-if = xorigin # Hangs
|
||||
[test_override_request.html]
|
||||
skip-if = toolkit == 'android' && !is_fennec # Bug 1530681
|
||||
|| xorigin # Hangs
|
||||
skip-if =
|
||||
toolkit == 'android' && !is_fennec # Bug 1530681
|
||||
xorigin # Hangs
|
||||
|
@ -240,8 +240,9 @@ skip-if = os == "android" #Bug 1575739
|
||||
[test_abs_positioner_hidden_during_dragging.html]
|
||||
skip-if = os == 'android' # Sync with test_abs_positioner_positioning_elements.html
|
||||
[test_abs_positioner_positioning_elements.html]
|
||||
skip-if = os == 'android' # Bug 1525959
|
||||
|| xorigin # Inconsistent pass/fail in opt and debug
|
||||
skip-if =
|
||||
os == 'android' # Bug 1525959
|
||||
xorigin # Inconsistent pass/fail in opt and debug
|
||||
[test_CF_HTML_clipboard.html]
|
||||
skip-if = os != 'mac' # bug 574005
|
||||
[test_cmd_fontFace_with_tt.html]
|
||||
|
@ -9,14 +9,18 @@
|
||||
[test_bug982141.html]
|
||||
[test_group_scrollframe_activation.html]
|
||||
[test_bug1151667.html]
|
||||
skip-if = (os == 'android') # wheel events not supported on mobile
|
||||
|| xorigin # JavaScript error: http://mochi.test:8888/tests/gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js, line 10: Error: Permission denied to access property "getResolution"
|
||||
skip-if =
|
||||
os == 'android' # wheel events not supported on mobile
|
||||
xorigin # JavaScript error: http://mochi.test:8888/tests/gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js, line 10: Error: Permission denied to access property "getResolution"
|
||||
[test_bug1253683.html]
|
||||
skip-if = (os == 'android') || (verify && debug && (os == 'linux')) # wheel events not supported on mobile
|
||||
|| xorigin # JavaScript error: http://mochi.test:8888/tests/gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js, line 10: Error: Permission denied to access property "getResolution"
|
||||
skip-if =
|
||||
os == 'android' # wheel events not supported on mobile
|
||||
verify && debug && os == 'linux'
|
||||
xorigin # JavaScript error: http://mochi.test:8888/tests/gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js, line 10: Error: Permission denied to access property "getResolution"
|
||||
[test_bug1277814.html]
|
||||
skip-if = (os == 'android') # wheel events not supported on mobile
|
||||
|| xorigin # JavaScript error: http://mochi.test:8888/tests/gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js, line 10: Error: Permission denied to access property "getResolution"
|
||||
skip-if =
|
||||
os == 'android' # wheel events not supported on mobile
|
||||
xorigin # JavaScript error: http://mochi.test:8888/tests/gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js, line 10: Error: Permission denied to access property "getResolution"
|
||||
[test_bug1304689.html]
|
||||
[test_bug1304689-2.html]
|
||||
[test_group_bug1464568.html]
|
||||
@ -29,13 +33,15 @@
|
||||
[test_group_minimum_scale_size.html]
|
||||
run-if = (os == 'android')
|
||||
[test_group_mouseevents.html]
|
||||
skip-if = (toolkit == 'android') # mouse events not supported on mobile
|
||||
|| xorigin # Fails and hangs - incorrect coordinates, scroll positions don't persist
|
||||
skip-if =
|
||||
toolkit == 'android' # mouse events not supported on mobile
|
||||
xorigin # Fails and hangs - incorrect coordinates, scroll positions don't persist
|
||||
[test_group_pointerevents.html]
|
||||
skip-if = (os == 'win' && os_version == '10.0') # Bug 1404836
|
||||
[test_group_touchevents.html]
|
||||
skip-if = (verify && debug && (os == 'win'))
|
||||
|| xorigin # Hangs
|
||||
skip-if =
|
||||
verify && debug && os == 'win'
|
||||
xorigin # Hangs
|
||||
[test_group_touchevents-2.html]
|
||||
skip-if = (verify && debug && (os == 'win'))
|
||||
[test_group_touchevents-3.html]
|
||||
@ -47,8 +53,9 @@
|
||||
[test_group_wheelevents.html]
|
||||
skip-if = (toolkit == 'android') # wheel events not supported on mobile
|
||||
[test_group_zoom.html]
|
||||
skip-if = (os == 'win') # see bug 1495580 for Windows
|
||||
|| xorigin # Incorrect coordinates, scroll positions don't persist
|
||||
skip-if =
|
||||
os == 'win' # see bug 1495580 for Windows
|
||||
xorigin # Incorrect coordinates, scroll positions don't persist
|
||||
[test_group_zoom-2.html]
|
||||
skip-if = (os == 'win') # see bug 1495580 for Windows
|
||||
[test_group_double_tap_zoom.html]
|
||||
@ -57,11 +64,13 @@
|
||||
fail-if = xorigin # Incorrect coordinates, scroll positions don't persist
|
||||
[test_group_keyboard.html]
|
||||
[test_layerization.html]
|
||||
skip-if = (os == 'android') # wheel events not supported on mobile
|
||||
|| xorigin # JavaScript error: http://mochi.test:8888/tests/gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js, line 10: Error: Permission denied to access property "getResolution"
|
||||
skip-if =
|
||||
os == 'android' # wheel events not supported on mobile
|
||||
xorigin # JavaScript error: http://mochi.test:8888/tests/gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js, line 10: Error: Permission denied to access property "getResolution"
|
||||
[test_relative_update.html]
|
||||
skip-if = (os == 'android') # wheel events not supported on mobile
|
||||
|| xorigin # JavaScript error: http://mochi.test:8888/tests/gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js, line 10: Error: Permission denied to access property "getResolution"
|
||||
skip-if =
|
||||
os == 'android' # wheel events not supported on mobile
|
||||
xorigin # JavaScript error: http://mochi.test:8888/tests/gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js, line 10: Error: Permission denied to access property "getResolution"
|
||||
[test_scroll_inactive_bug1190112.html]
|
||||
skip-if = (os == 'android') # wheel events not supported on mobile
|
||||
[test_scroll_inactive_flattened_frame.html]
|
||||
@ -69,20 +78,26 @@
|
||||
[test_scroll_subframe_scrollbar.html]
|
||||
skip-if = (os == 'android') # wheel events not supported on mobile
|
||||
[test_touch_listeners_impacting_wheel.html]
|
||||
skip-if = (toolkit == 'android') || (toolkit == 'cocoa') # wheel events not supported on mobile, and synthesized wheel smooth-scrolling not supported on OS X
|
||||
|| xorigin # JavaScript error: http://mochi.test:8888/tests/gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js, line 10: Error: Permission denied to access property "getResolution"
|
||||
skip-if =
|
||||
toolkit == 'android' # wheel events not supported on mobile
|
||||
toolkit == 'cocoa' # synthesized wheel smooth-scrolling not supported on OS X
|
||||
xorigin # JavaScript error: http://mochi.test:8888/tests/gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js, line 10: Error: Permission denied to access property "getResolution"
|
||||
[test_wheel_scroll.html]
|
||||
skip-if = (os == 'android') # wheel events not supported on mobile
|
||||
|| xorigin # Hangs
|
||||
skip-if =
|
||||
os == 'android' # wheel events not supported on mobile
|
||||
xorigin # Hangs
|
||||
[test_wheel_transactions.html]
|
||||
skip-if = (toolkit == 'android') # wheel events not supported on mobile
|
||||
|| xorigin # Hangs
|
||||
skip-if =
|
||||
toolkit == 'android' # wheel events not supported on mobile
|
||||
xorigin # Hangs
|
||||
[test_group_overrides.html]
|
||||
skip-if = (toolkit == 'android') # wheel events not supported on mobile
|
||||
|| xorigin # Hangs
|
||||
skip-if =
|
||||
toolkit == 'android' # wheel events not supported on mobile
|
||||
xorigin # Hangs
|
||||
[test_group_hittest.html]
|
||||
skip-if = (toolkit == 'android') # mouse events not supported on mobile
|
||||
|| xorigin # Hangs
|
||||
skip-if =
|
||||
toolkit == 'android' # mouse events not supported on mobile
|
||||
xorigin # Hangs
|
||||
[test_group_zoomToFocusedInput.html]
|
||||
[test_group_scroll_snap.html]
|
||||
skip-if = (os == 'android') # wheel events not supported on mobile
|
||||
@ -91,5 +106,6 @@
|
||||
# hardware vsync only on win/mac
|
||||
# e10s only since APZ is only enabled on e10s
|
||||
# Frame Uniformity recording is not implemented for webrender
|
||||
skip-if = debug || (os != 'mac' && os != 'win') || !e10s || verify || webrender
|
||||
|| true # Don't run in CI yet, see bug 1657477
|
||||
skip-if =
|
||||
debug || (os != 'mac' && os != 'win') || !e10s || verify || webrender
|
||||
true # Don't run in CI yet, see bug 1657477
|
||||
|
@ -98,8 +98,9 @@ skip-if = toolkit == 'android' # Bug 1355821
|
||||
skip-if = toolkit == 'android' # Bug 1355821
|
||||
support-files = bug851445_helper.html
|
||||
[test_bug851485.html]
|
||||
skip-if = toolkit == 'android' # Bug 1355821
|
||||
|| fission # Hangs, undefined assertion name - got 4904, expected 500
|
||||
skip-if =
|
||||
toolkit == 'android' # Bug 1355821
|
||||
fission # Hangs, undefined assertion name - got 4904, expected 500
|
||||
[test_bug858459.html]
|
||||
skip-if = toolkit == 'android' # Bug 1355822
|
||||
[test_bug968148.html]
|
||||
|
@ -85,8 +85,9 @@ support-files = bug633762_iframe.html
|
||||
[test_bug735641.html]
|
||||
[test_bug748961.html]
|
||||
[test_bug756984.html]
|
||||
fail-if = (os == 'linux' && os_version == '18.04') # Bug 1600208 permafail on ubuntu1804
|
||||
|| xorigin
|
||||
fail-if =
|
||||
os == 'linux' && os_version == '18.04' # Bug 1600208 permafail on ubuntu1804
|
||||
xorigin
|
||||
[test_bug784410.html]
|
||||
[test_bug785324.html]
|
||||
[test_bug791616.html]
|
||||
|
@ -39,6 +39,12 @@ def log(msg, level="info"):
|
||||
# built-in filters
|
||||
|
||||
|
||||
def _match(exprs, **values):
|
||||
if any(parse(e, **values) for e in exprs.splitlines() if e):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def skip_if(tests, values):
|
||||
"""
|
||||
Sets disabled on all tests containing the `skip-if` tag and whose condition
|
||||
@ -46,7 +52,7 @@ def skip_if(tests, values):
|
||||
"""
|
||||
tag = "skip-if"
|
||||
for test in tests:
|
||||
if tag in test and parse(test[tag], **values):
|
||||
if tag in test and _match(test[tag], **values):
|
||||
test.setdefault("disabled", "{}: {}".format(tag, test[tag]))
|
||||
yield test
|
||||
|
||||
@ -58,7 +64,7 @@ def run_if(tests, values):
|
||||
"""
|
||||
tag = "run-if"
|
||||
for test in tests:
|
||||
if tag in test and not parse(test[tag], **values):
|
||||
if tag in test and not _match(test[tag], **values):
|
||||
test.setdefault("disabled", "{}: {}".format(tag, test[tag]))
|
||||
yield test
|
||||
|
||||
@ -70,7 +76,7 @@ def fail_if(tests, values):
|
||||
"""
|
||||
tag = "fail-if"
|
||||
for test in tests:
|
||||
if tag in test and parse(test[tag], **values):
|
||||
if tag in test and _match(test[tag], **values):
|
||||
test["expected"] = "fail"
|
||||
yield test
|
||||
|
||||
|
@ -168,7 +168,7 @@ def combine_fields(global_vars, local_vars):
|
||||
return global_vars.copy()
|
||||
field_patterns = {
|
||||
"prefs": "%s %s",
|
||||
"skip-if": "(%s) || (%s)",
|
||||
"skip-if": "%s\n%s",
|
||||
"support-files": "%s %s",
|
||||
}
|
||||
final_mapping = global_vars.copy()
|
||||
|
@ -26,23 +26,19 @@ class TestDefaultSkipif(unittest.TestCase):
|
||||
parser = ManifestParser(manifests=(default,))
|
||||
for test in parser.tests:
|
||||
if test["name"] == "test1":
|
||||
self.assertEqual(test["skip-if"], "(os == 'win' && debug) || (debug)")
|
||||
self.assertEqual(test["skip-if"], "os == 'win' && debug\ndebug")
|
||||
elif test["name"] == "test2":
|
||||
self.assertEqual(
|
||||
test["skip-if"], "(os == 'win' && debug) || (os == 'linux')"
|
||||
)
|
||||
self.assertEqual(test["skip-if"], "os == 'win' && debug\nos == 'linux'")
|
||||
elif test["name"] == "test3":
|
||||
self.assertEqual(
|
||||
test["skip-if"], "(os == 'win' && debug) || (os == 'win')"
|
||||
)
|
||||
self.assertEqual(test["skip-if"], "os == 'win' && debug\nos == 'win'")
|
||||
elif test["name"] == "test4":
|
||||
self.assertEqual(
|
||||
test["skip-if"], "(os == 'win' && debug) || (os == 'win' && debug)"
|
||||
test["skip-if"], "os == 'win' && debug\nos == 'win' && debug"
|
||||
)
|
||||
elif test["name"] == "test5":
|
||||
self.assertEqual(test["skip-if"], "os == 'win' && debug")
|
||||
elif test["name"] == "test6":
|
||||
self.assertEqual(test["skip-if"], "(os == 'win' && debug) || (debug)")
|
||||
self.assertEqual(test["skip-if"], "os == 'win' && debug\ndebug")
|
||||
|
||||
|
||||
class TestDefaultSupportFiles(unittest.TestCase):
|
||||
|
@ -25,9 +25,15 @@ here = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
||||
def test_data_model():
|
||||
foo = lambda x, y: x
|
||||
bar = lambda x, y: x
|
||||
baz = lambda x, y: x
|
||||
def foo(x, y):
|
||||
return x
|
||||
|
||||
def bar(x, y):
|
||||
return x
|
||||
|
||||
def baz(x, y):
|
||||
return x
|
||||
|
||||
fl = filterlist()
|
||||
|
||||
fl.extend([foo, bar])
|
||||
@ -58,8 +64,12 @@ def test_add_non_callable_to_list():
|
||||
|
||||
|
||||
def test_add_duplicates_to_list():
|
||||
foo = lambda x, y: x
|
||||
bar = lambda x, y: x
|
||||
def foo(x, y):
|
||||
return x
|
||||
|
||||
def bar(x, y):
|
||||
return x
|
||||
|
||||
sub = subsuite("foo")
|
||||
fl = filterlist([foo, bar, sub])
|
||||
assert len(fl) == 3
|
||||
@ -85,12 +95,23 @@ def test_add_two_tags_filters():
|
||||
|
||||
|
||||
def test_filters_run_in_order():
|
||||
a = lambda x, y: x
|
||||
b = lambda x, y: x
|
||||
c = lambda x, y: x
|
||||
d = lambda x, y: x
|
||||
e = lambda x, y: x
|
||||
f = lambda x, y: x
|
||||
def a(x, y):
|
||||
return x
|
||||
|
||||
def b(x, y):
|
||||
return x
|
||||
|
||||
def c(x, y):
|
||||
return x
|
||||
|
||||
def d(x, y):
|
||||
return x
|
||||
|
||||
def e(x, y):
|
||||
return x
|
||||
|
||||
def f(x, y):
|
||||
return x
|
||||
|
||||
fl = filterlist([a, b])
|
||||
fl.append(c)
|
||||
@ -146,6 +167,7 @@ def tests(create_tests):
|
||||
("test5", {"subsuite": "baz"}),
|
||||
("test6", {"subsuite": "baz,foo == 'bar'"}),
|
||||
("test7", {"tags": "foo bar"}),
|
||||
("test8", {"skip-if": "\nbaz\nfoo == 'bar'\nfoo == 'baz'"}),
|
||||
)
|
||||
|
||||
|
||||
@ -156,17 +178,18 @@ def test_skip_if(tests):
|
||||
|
||||
tests = deepcopy(ref)
|
||||
tests = list(skip_if(tests, {"foo": "bar"}))
|
||||
assert tests[1] not in ref
|
||||
assert "disabled" in tests[1]
|
||||
assert "disabled" in tests[8]
|
||||
|
||||
|
||||
def test_run_if(tests):
|
||||
ref = deepcopy(tests)
|
||||
tests = list(run_if(tests, {}))
|
||||
assert ref[2] not in tests
|
||||
assert "disabled" in tests[2]
|
||||
|
||||
tests = deepcopy(ref)
|
||||
tests = list(run_if(tests, {"foo": "bar"}))
|
||||
assert len(tests) == len(ref)
|
||||
assert "disabled" not in tests[2]
|
||||
|
||||
|
||||
def test_fail_if(tests):
|
||||
|
@ -106,12 +106,32 @@ def test_defaults_handling(parse_manifest):
|
||||
)[0][1]
|
||||
assert result["flower"] == "rose"
|
||||
assert result["colour"] == "pink"
|
||||
assert result["skip-if"] == "(false) || (true)"
|
||||
assert result["skip-if"] == "false\ntrue"
|
||||
|
||||
result = parse_manifest(manifest.replace("DEFAULT", "default"))[0][1]
|
||||
assert result["flower"] == "rose"
|
||||
assert result["skip-if"] == "true"
|
||||
|
||||
|
||||
def test_multiline_skip(parse_manifest):
|
||||
manifest = """
|
||||
[test_multiline_skip]
|
||||
skip-if =
|
||||
os == "mac" # bug 123
|
||||
os == "linux" && debug # bug 456
|
||||
"""
|
||||
|
||||
result = parse_manifest(manifest)[0][1]
|
||||
assert (
|
||||
result["skip-if"]
|
||||
== dedent(
|
||||
"""
|
||||
os == "mac"
|
||||
os == "linux" && debug
|
||||
"""
|
||||
).rstrip()
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
mozunit.main()
|
||||
|
@ -67,8 +67,10 @@ prefs =
|
||||
browser.chrome.guess_favicon=true
|
||||
|
||||
[test_ext_activityLog.html]
|
||||
skip-if = os == 'android' || tsan # Times out on TSan, bug 1612707
|
||||
|| xorigin # Inconsistent pass/fail in opt and debug
|
||||
skip-if =
|
||||
os == 'android'
|
||||
tsan # Times out on TSan, bug 1612707
|
||||
xorigin # Inconsistent pass/fail in opt and debug
|
||||
[test_ext_async_clipboard.html]
|
||||
skip-if = toolkit == 'android' || tsan # near-permafail after landing bug 1270059: Bug 1523131. tsan: bug 1612707
|
||||
[test_ext_background_canvas.html]
|
||||
@ -169,8 +171,10 @@ skip-if = os == 'android' # bug 1513544
|
||||
skip-if = os == 'android'
|
||||
[test_ext_webrequest_background_events.html]
|
||||
[test_ext_webrequest_basic.html]
|
||||
skip-if = os == 'android' && debug || tsan # bug 1397615. tsan: bug 1612707
|
||||
|| xorigin # JavaScript Error: "SecurityError: Permission denied to access property "wrappedJSObject" on cross-origin object" {file: "http://mochi.false-test:8888/tests/SimpleTest/TestRunner.js" line: 157}]
|
||||
skip-if =
|
||||
os == 'android' && debug # bug 1397615
|
||||
tsan # bug 1612707
|
||||
xorigin # JavaScript Error: "SecurityError: Permission denied to access property "wrappedJSObject" on cross-origin object" {file: "http://mochi.false-test:8888/tests/SimpleTest/TestRunner.js" line: 157}]
|
||||
[test_ext_webrequest_errors.html]
|
||||
skip-if = tsan
|
||||
[test_ext_webrequest_filter.html]
|
||||
|
@ -9,5 +9,6 @@ support-files =
|
||||
file_mousecapture3.html
|
||||
file_mousecapture4.html
|
||||
file_mousecapture5.html
|
||||
skip-if = toolkit == "android"
|
||||
|| xorigin # SecurityError: Permission denied to access property "scrollX" on cross-origin object at runTests@http://mochi.test:8888/tests/toolkit/content/tests/mochitest/test_mousecapture.xhtml:170:17, inconsistent fail/pass
|
||||
skip-if =
|
||||
toolkit == "android"
|
||||
xorigin # SecurityError: Permission denied to access property "scrollX" on cross-origin object at runTests@http://mochi.test:8888/tests/toolkit/content/tests/mochitest/test_mousecapture.xhtml:170:17, inconsistent fail/pass
|
||||
|
@ -43,8 +43,9 @@ skip-if = toolkit == 'android' # bug 1272646
|
||||
[test_videocontrols_standalone.html]
|
||||
skip-if = toolkit == 'android' # bug 1075573
|
||||
[test_videocontrols_video_direction.html]
|
||||
skip-if = os == 'win'
|
||||
|| xorigin # Rendering of reftest videocontrols_direction-2a.html should not be different to the reference, fails/passes inconsistently
|
||||
skip-if =
|
||||
os == 'win'
|
||||
xorigin # Rendering of reftest videocontrols_direction-2a.html should not be different to the reference, fails/passes inconsistently
|
||||
[test_videocontrols_video_noaudio.html]
|
||||
[test_bug898940.html]
|
||||
skip-if = (os == "win" && processor == "aarch64") # aarch64 due to 1536347
|
||||
|
Loading…
Reference in New Issue
Block a user