summaryrefslogtreecommitdiffstats
path: root/testing/mozbase
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /testing/mozbase
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/mozbase')
-rw-r--r--testing/mozbase/mozgeckoprofiler/mozgeckoprofiler/symbolicationRequest.py2
-rw-r--r--testing/mozbase/mozgeckoprofiler/tests/test_view_gecko_profiler.py2
-rw-r--r--testing/mozbase/mozhttpd/tests/filelisting.py2
-rw-r--r--testing/mozbase/mozleak/mozleak/lsan.py10
-rw-r--r--testing/mozbase/mozlog/mozlog/formatters/html/main.js2
-rw-r--r--testing/mozbase/moznetwork/tests/test_moznetwork.py4
-rw-r--r--testing/mozbase/mozrunner/mozrunner/devices/android_device.py18
7 files changed, 25 insertions, 15 deletions
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 ([^(</]+)")
+ self.stackFrameRegExp = re.compile(r" #\d+ 0x[0-9a-f]+ in ([^(</]+)")
self.sysLibStackFrameRegExp = re.compile(
- " #\d+ 0x[0-9a-f]+ \(([^+]+)\+0x[0-9a-f]+\)"
+ r" #\d+ 0x[0-9a-f]+ \(([^+]+)\+0x[0-9a-f]+\)"
)
self.summaryRegexp = re.compile(
- "SUMMARY: AddressSanitizer: (\d+) byte\(s\) leaked in (\d+) allocation\(s\)."
+ r"SUMMARY: AddressSanitizer: (\d+) byte\(s\) leaked in (\d+) allocation\(s\)."
)
self.rustRegexp = re.compile("::h[a-f0-9]{16}$")
self.setAllowed(allowed)
diff --git a/testing/mozbase/mozlog/mozlog/formatters/html/main.js b/testing/mozbase/mozlog/mozlog/formatters/html/main.js
index 61403f611b..62ccf191aa 100644
--- a/testing/mozbase/mozlog/mozlog/formatters/html/main.js
+++ b/testing/mozbase/mozlog/mozlog/formatters/html/main.js
@@ -52,7 +52,7 @@ addEventListener("DOMContentLoaded", function () {
});
find_all(".sortable").forEach(function (elem) {
- elem.addEventListener("click", function (event) {
+ elem.addEventListener("click", function () {
toggle_sort_states(elem);
var colIndex = toArray(elem.parentNode.childNodes).indexOf(elem);
var key = elem.classList.contains("numeric") ? key_num : key_alpha;
diff --git a/testing/mozbase/moznetwork/tests/test_moznetwork.py b/testing/mozbase/moznetwork/tests/test_moznetwork.py
index 8a1ee31a2e..5be960cca1 100644
--- a/testing/mozbase/moznetwork/tests/test_moznetwork.py
+++ b/testing/mozbase/moznetwork/tests/test_moznetwork.py
@@ -21,8 +21,8 @@ def ip_addresses():
# Regex to match IPv4 addresses.
# 0-255.0-255.0-255.0-255, note order is important here.
regexip = re.compile(
- "((25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){3}"
- "(25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)"
+ r"((25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){3}"
+ r"(25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)"
)
commands = (
diff --git a/testing/mozbase/mozrunner/mozrunner/devices/android_device.py b/testing/mozbase/mozrunner/mozrunner/devices/android_device.py
index 45565349f5..7cbec1b6f8 100644
--- a/testing/mozbase/mozrunner/mozrunner/devices/android_device.py
+++ b/testing/mozbase/mozrunner/mozrunner/devices/android_device.py
@@ -260,7 +260,7 @@ def _maybe_update_host_utils(build_obj):
# Compare, prompt, update
if existing_version and manifest_version:
- hu_version_regex = "host-utils-([\d\.]*)"
+ hu_version_regex = r"host-utils-([\d\.]*)"
manifest_version = float(re.search(hu_version_regex, manifest_version).group(1))
existing_version = float(re.search(hu_version_regex, existing_version).group(1))
if existing_version < manifest_version:
@@ -305,11 +305,21 @@ def verify_android_device(
Returns True if the emulator was started or another device was
already connected.
"""
- if "MOZ_DISABLE_ADB_INSTALL" in os.environ:
+ if "MOZ_DISABLE_ADB_INSTALL" in os.environ or install == InstallIntent.NO:
install = InstallIntent.NO
_log_info(
- "Found MOZ_DISABLE_ADB_INSTALL in environment, skipping android app"
- "installation"
+ "Found MOZ_DISABLE_ADB_INSTALL in environment and/or the"
+ " --noinstall flag, skipping android app installation"
+ )
+ else:
+ _log_info(
+ "*********************************************************************\n"
+ "Neither the MOZ_DISABLE_ADB_INSTALL environment variable nor the\n"
+ "--noinstall flag was found. The code will now uninstall the current\n"
+ "app then re-install the android app from a different source. If you\n"
+ "don't want this set your local env so that\n"
+ "MOZ_DISABLE_ADB_INSTALL=True or pass the --noinstall flag\n"
+ "*********************************************************************"
)
device_verified = False
emulator = AndroidEmulator("*", substs=build_obj.substs, verbose=verbose)