From fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:14:29 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- .../mozgeckoprofiler/symbolicationRequest.py | 2 +- .../mozgeckoprofiler/tests/test_view_gecko_profiler.py | 2 +- testing/mozbase/mozhttpd/tests/filelisting.py | 2 +- testing/mozbase/mozleak/mozleak/lsan.py | 10 +++++----- testing/mozbase/mozlog/mozlog/formatters/html/main.js | 2 +- testing/mozbase/moznetwork/tests/test_moznetwork.py | 4 ++-- .../mozrunner/mozrunner/devices/android_device.py | 18 ++++++++++++++---- 7 files changed, 25 insertions(+), 15 deletions(-) (limited to 'testing/mozbase') diff --git a/testing/mozbase/mozgeckoprofiler/mozgeckoprofiler/symbolicationRequest.py b/testing/mozbase/mozgeckoprofiler/mozgeckoprofiler/symbolicationRequest.py index 1b277abbde..5eda7475e1 100644 --- a/testing/mozbase/mozgeckoprofiler/mozgeckoprofiler/symbolicationRequest.py +++ b/testing/mozbase/mozgeckoprofiler/mozgeckoprofiler/symbolicationRequest.py @@ -11,7 +11,7 @@ LOG = get_proxy_logger("profiler") # Precompiled regex for validating lib names # Empty lib name means client couldn't associate frame with any lib -gLibNameRE = re.compile("[0-9a-zA-Z_+\-\.]*$") +gLibNameRE = re.compile(r"[0-9a-zA-Z_+\-\.]*$") # Maximum number of times a request can be forwarded to a different server # for symbolication. Also prevents loops. diff --git a/testing/mozbase/mozgeckoprofiler/tests/test_view_gecko_profiler.py b/testing/mozbase/mozgeckoprofiler/tests/test_view_gecko_profiler.py index 76dd0f4594..1eae696c60 100644 --- a/testing/mozbase/mozgeckoprofiler/tests/test_view_gecko_profiler.py +++ b/testing/mozbase/mozgeckoprofiler/tests/test_view_gecko_profiler.py @@ -85,7 +85,7 @@ class TestViewGeckoProfile(unittest.TestCase): "https://profiler.firefox.com/from-url/" "http%3A%2F%2F127.0.0.1%3A{PORT}%2Ffakeprofile.json" ) - actual_url = re.sub("%3A\d+%2F", "%3A{PORT}%2F", self.firefox_profiler_url) + actual_url = re.sub(r"%3A\d+%2F", "%3A{PORT}%2F", self.firefox_profiler_url) self.assertEqual( actual_url, diff --git a/testing/mozbase/mozhttpd/tests/filelisting.py b/testing/mozbase/mozhttpd/tests/filelisting.py index 195059a261..bdfdcf979a 100644 --- a/testing/mozbase/mozhttpd/tests/filelisting.py +++ b/testing/mozbase/mozhttpd/tests/filelisting.py @@ -45,7 +45,7 @@ def test_filelist(httpd, docroot, path): filelist = os.listdir(docroot) - pattern = "\<[a-zA-Z0-9\-\_\.\=\"'\/\\\%\!\@\#\$\^\&\*\(\) :;]*\>" + pattern = r"""\<[a-zA-Z0-9\-\_\.\="'\/\\%\!\@\#\$\^\&\*\(\) :;]*\>""" for line in f.readlines(): subbed_lined = re.sub(pattern, "", ensure_str(line).strip("\n")) diff --git a/testing/mozbase/mozleak/mozleak/lsan.py b/testing/mozbase/mozleak/mozleak/lsan.py index f6555eff2d..779a6a5cce 100644 --- a/testing/mozbase/mozleak/mozleak/lsan.py +++ b/testing/mozbase/mozleak/mozleak/lsan.py @@ -60,20 +60,20 @@ class LSANLeaks(object): ) self.startRegExp = re.compile( - "==\d+==ERROR: LeakSanitizer: detected memory leaks" + r"==\d+==ERROR: LeakSanitizer: detected memory leaks" ) self.fatalErrorRegExp = re.compile( - "==\d+==LeakSanitizer has encountered a fatal error." + r"==\d+==LeakSanitizer has encountered a fatal error." ) self.symbolizerOomRegExp = re.compile( "LLVMSymbolizer: error reading file: Cannot allocate memory" ) - self.stackFrameRegExp = re.compile(" #\d+ 0x[0-9a-f]+ in ([^(