From 23e9234755a37efeb59ca7bd8184f30c39236b54 Mon Sep 17 00:00:00 2001 From: Joel Maher Date: Mon, 29 Aug 2022 20:02:28 +0000 Subject: [PATCH] Bug 1780222 - annotation report should show multi line conditions properly. r=gbrown,webdriver-reviewers,whimboo Differential Revision: https://phabricator.services.mozilla.com/D155761 --- .../tests/functional/safebrowsing/manifest.ini | 6 +++++- .../marionette_harness/tests/unit/unit-tests.ini | 8 +++++--- testing/mozbase/mozinstall/tests/manifest.ini | 4 ++-- testing/mozbase/mozprocess/tests/manifest.ini | 2 +- testing/mozbase/mozrunner/tests/manifest.ini | 2 +- testing/testinfo.py | 12 ++++++++++++ testing/xpcshell/example/unit/xpcshell.ini | 8 ++++---- 7 files changed, 30 insertions(+), 12 deletions(-) diff --git a/testing/firefox-ui/tests/functional/safebrowsing/manifest.ini b/testing/firefox-ui/tests/functional/safebrowsing/manifest.ini index b0eefdc12108..6461aca5928e 100644 --- a/testing/firefox-ui/tests/functional/safebrowsing/manifest.ini +++ b/testing/firefox-ui/tests/functional/safebrowsing/manifest.ini @@ -1,4 +1,8 @@ [test_initial_download.py] -skip-if = debug || asan || (cc_type == "clang" && os == 'win') || (os == 'win' && bits == 64 && !debug && processor == "x86_64") # the GAPI key isn't available in debug or asan builds, bug 1526450 +skip-if = + debug + asan + (cc_type == 'clang' && os == 'win') + (os == 'win' && bits == 64 && !debug && processor == 'x86_64') # the GAPI key isn't available in debug or asan builds, bug 1526450 [test_notification.py] [test_warning_pages.py] diff --git a/testing/marionette/harness/marionette_harness/tests/unit/unit-tests.ini b/testing/marionette/harness/marionette_harness/tests/unit/unit-tests.ini index f980f63c34cb..06c4cd25e819 100644 --- a/testing/marionette/harness/marionette_harness/tests/unit/unit-tests.ini +++ b/testing/marionette/harness/marionette_harness/tests/unit/unit-tests.ini @@ -72,7 +72,8 @@ expected = fail [test_click_scrolling.py] [test_profile_management.py] skip-if = - manage_instance == false || (debug && ((os == 'mac') || (os == 'linux'))) # Bug 1450355 + manage_instance == false + (debug && ((os == 'mac') || (os == 'linux'))) # Bug 1450355 [test_quit_restart.py] skip-if = manage_instance == false [test_context.py] @@ -86,7 +87,7 @@ skip-if = manage_instance == false [test_teardown_context_preserved.py] [test_file_upload.py] -skip-if = os == "win" # http://bugs.python.org/issue14574 +skip-if = os == 'win' # http://bugs.python.org/issue14574 [test_execute_sandboxes.py] [test_prefs.py] @@ -100,7 +101,8 @@ skip-if = manage_instance == false [test_select.py] [test_crash.py] skip-if = - asan || manage_instance == false + asan + manage_instance == false [test_localization.py] [test_reftest.py] diff --git a/testing/mozbase/mozinstall/tests/manifest.ini b/testing/mozbase/mozinstall/tests/manifest.ini index fd6b72327302..d5e0d06976dd 100644 --- a/testing/mozbase/mozinstall/tests/manifest.ini +++ b/testing/mozbase/mozinstall/tests/manifest.ini @@ -1,8 +1,8 @@ [DEFAULT] subsuite = mozbase [test_binary.py] -skip-if = os == "mac" +skip-if = os == 'mac' [test_install.py] -skip-if = os == "mac" # intermittent +skip-if = os == 'mac' # intermittent [test_is_installer.py] [test_uninstall.py] diff --git a/testing/mozbase/mozprocess/tests/manifest.ini b/testing/mozbase/mozprocess/tests/manifest.ini index ec1dcf2cff6a..c63c4684c5c4 100644 --- a/testing/mozbase/mozprocess/tests/manifest.ini +++ b/testing/mozbase/mozprocess/tests/manifest.ini @@ -1,7 +1,7 @@ [DEFAULT] subsuite = mozbase [test_detached.py] -skip-if = os == "win" # Bug 1493796 +skip-if = os == 'win' # Bug 1493796 [test_kill.py] [test_misc.py] [test_pid.py] diff --git a/testing/mozbase/mozrunner/tests/manifest.ini b/testing/mozbase/mozrunner/tests/manifest.ini index bb7c9fc2d4a2..7348004fdf32 100644 --- a/testing/mozbase/mozrunner/tests/manifest.ini +++ b/testing/mozbase/mozrunner/tests/manifest.ini @@ -2,7 +2,7 @@ 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" +skip-if = automation && os == 'win' [test_crash.py] [test_interactive.py] [test_start.py] diff --git a/testing/testinfo.py b/testing/testinfo.py index 656c86a80ab5..bd6df80436ff 100644 --- a/testing/testinfo.py +++ b/testing/testinfo.py @@ -582,6 +582,18 @@ class TestInfoReport(TestInfo): # "skip-if(Android&&webrender) skip-if(OSX)", would be # encoded as t['skip-if'] = "Android&&webrender;OSX". annotation_conditions = t[key].split(";") + + # if key has \n in it, we need to strip it. for manifestparser format + # 1) from the beginning of the line + # 2) different conditions if in the middle of the line + annotation_conditions = [ + x.strip("\n") for x in annotation_conditions + ] + temp = [] + for condition in annotation_conditions: + temp.extend(condition.split("\n")) + annotation_conditions = temp + for condition in annotation_conditions: condition_count += 1 # Trim reftest fuzzy-if ranges: everything after the first comma diff --git a/testing/xpcshell/example/unit/xpcshell.ini b/testing/xpcshell/example/unit/xpcshell.ini index 0644db68ccf1..869875435bb7 100644 --- a/testing/xpcshell/example/unit/xpcshell.ini +++ b/testing/xpcshell/example/unit/xpcshell.ini @@ -17,10 +17,10 @@ support-files = [test_add_setup.js] [test_check_nsIException.js] -skip-if = os == "win" && debug +skip-if = os == 'win' && debug [test_check_nsIException_failing.js] fail-if = true -skip-if = os == "win" && debug +skip-if = os == 'win' && debug [test_do_get_tempdir.js] [test_execute_soon.js] @@ -46,11 +46,11 @@ fail-if = true skip-if = true [test_do_check_null.js] -skip-if = os == "win" && debug +skip-if = os == 'win' && debug [test_do_check_null_failing.js] fail-if = true -skip-if = os == "win" && debug +skip-if = os == 'win' && debug [test_do_check_matches.js] [test_do_check_matches_failing.js]