diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /testing/mozharness/configs/android/android_common.py | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/mozharness/configs/android/android_common.py')
-rw-r--r-- | testing/mozharness/configs/android/android_common.py | 325 |
1 files changed, 325 insertions, 0 deletions
diff --git a/testing/mozharness/configs/android/android_common.py b/testing/mozharness/configs/android/android_common.py new file mode 100644 index 0000000000..23d93e7736 --- /dev/null +++ b/testing/mozharness/configs/android/android_common.py @@ -0,0 +1,325 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +# Shared/common mozharness configuration for Android unit tests. +# +# This configuration should be combined with platform-specific mozharness +# configuration such as android-x86_64.py, android_hw, or similar. + +import os + +NODEJS_PATH = None +if "MOZ_FETCHES_DIR" in os.environ: + NODEJS_PATH = os.path.join(os.environ["MOZ_FETCHES_DIR"], "node/bin/node") + + +def WebglSuite(name): + return { + "run_filename": "runtestsremote.py", + "testsdir": "mochitest", + "options": [ + "--app=%(app)s", + "--remote-webserver=%(remote_webserver)s", + "--xre-path=%(xre_path)s", + "--utility-path=%(utility_path)s", + "--http-port=%(http_port)s", + "--ssl-port=%(ssl_port)s", + "--certificate-path=%(certs_path)s", + "--symbols-path=%(symbols_path)s", + "--quiet", + "--log-errorsummary=%(error_summary_file)s", + "--log-tbpl-level=%(log_tbpl_level)s", + "--screenshot-on-fail", + "--subsuite=" + name, + "--deviceSerial=%(device_serial)s", + ], + } + + +config = { + "default_actions": [ + "clobber", + "download-and-extract", + "create-virtualenv", + "start-emulator", + "verify-device", + "install", + "run-tests", + ], + "tooltool_cache": os.environ.get("TOOLTOOL_CACHE"), + "hostutils_manifest_path": "testing/config/tooltool-manifests/linux64/hostutils.manifest", + # "log_format": "%(levelname)8s - %(message)s", + "log_tbpl_level": "info", + "log_raw_level": "info", + # To take device screenshots at timed intervals (each time in seconds, relative + # to the start of the run-tests step) specify screenshot_times. For example, to + # take 4 screenshots at one minute intervals you could specify: + # "screenshot_times": [60, 120, 180, 240], + "nodejs_path": NODEJS_PATH, + "suite_definitions": { + "mochitest-plain": { + "run_filename": "runtestsremote.py", + "testsdir": "mochitest", + "options": [ + "--app=%(app)s", + "--remote-webserver=%(remote_webserver)s", + "--xre-path=%(xre_path)s", + "--utility-path=%(utility_path)s", + "--http-port=%(http_port)s", + "--ssl-port=%(ssl_port)s", + "--certificate-path=%(certs_path)s", + "--symbols-path=%(symbols_path)s", + "--quiet", + "--log-errorsummary=%(error_summary_file)s", + "--log-tbpl-level=%(log_tbpl_level)s", + "--extra-profile-file=fonts", + "--extra-profile-file=hyphenation", + "--screenshot-on-fail", + "--deviceSerial=%(device_serial)s", + ], + }, + "mochitest-webgl1-core": WebglSuite("webgl1-core"), + "mochitest-webgl2-core": WebglSuite("webgl2-core"), + "mochitest-webgl1-ext": WebglSuite("webgl1-ext"), + "mochitest-webgl2-ext": WebglSuite("webgl2-ext"), + "mochitest-webgl2-deqp": WebglSuite("webgl2-deqp"), + "mochitest-webgpu": WebglSuite("webgpu"), + "mochitest-plain-gpu": { + "run_filename": "runtestsremote.py", + "testsdir": "mochitest", + "options": [ + "--app=%(app)s", + "--remote-webserver=%(remote_webserver)s", + "--xre-path=%(xre_path)s", + "--utility-path=%(utility_path)s", + "--http-port=%(http_port)s", + "--ssl-port=%(ssl_port)s", + "--certificate-path=%(certs_path)s", + "--symbols-path=%(symbols_path)s", + "--quiet", + "--log-errorsummary=%(error_summary_file)s", + "--log-tbpl-level=%(log_tbpl_level)s", + "--screenshot-on-fail", + "--subsuite=gpu", + "--deviceSerial=%(device_serial)s", + ], + }, + "mochitest-media": { + "run_filename": "runtestsremote.py", + "testsdir": "mochitest", + "options": [ + "--app=%(app)s", + "--remote-webserver=%(remote_webserver)s", + "--xre-path=%(xre_path)s", + "--utility-path=%(utility_path)s", + "--http-port=%(http_port)s", + "--ssl-port=%(ssl_port)s", + "--certificate-path=%(certs_path)s", + "--symbols-path=%(symbols_path)s", + "--quiet", + "--log-errorsummary=%(error_summary_file)s", + "--log-tbpl-level=%(log_tbpl_level)s", + "--screenshot-on-fail", + "--chunk-by-runtime", + "--subsuite=media", + "--deviceSerial=%(device_serial)s", + ], + }, + "reftest": { + "run_filename": "remotereftest.py", + "testsdir": "reftest", + "options": [ + "--app=%(app)s", + "--ignore-window-size", + "--remote-webserver=%(remote_webserver)s", + "--xre-path=%(xre_path)s", + "--utility-path=%(utility_path)s", + "--http-port=%(http_port)s", + "--ssl-port=%(ssl_port)s", + "--httpd-path", + "%(modules_dir)s", + "--symbols-path=%(symbols_path)s", + "--extra-profile-file=fonts", + "--extra-profile-file=hyphenation", + "--suite=reftest", + "--log-errorsummary=%(error_summary_file)s", + "--log-tbpl-level=%(log_tbpl_level)s", + "--deviceSerial=%(device_serial)s", + "--topsrcdir=tests", + ], + "tests": [ + "tests/layout/reftests/reftest.list", + ], + }, + "reftest-qr": { + "run_filename": "remotereftest.py", + "testsdir": "reftest", + "options": [ + "--app=%(app)s", + "--ignore-window-size", + "--remote-webserver=%(remote_webserver)s", + "--xre-path=%(xre_path)s", + "--utility-path=%(utility_path)s", + "--http-port=%(http_port)s", + "--ssl-port=%(ssl_port)s", + "--httpd-path", + "%(modules_dir)s", + "--symbols-path=%(symbols_path)s", + "--extra-profile-file=fonts", + "--extra-profile-file=hyphenation", + "--suite=reftest", + "--log-errorsummary=%(error_summary_file)s", + "--log-tbpl-level=%(log_tbpl_level)s", + "--deviceSerial=%(device_serial)s", + "--topsrcdir=tests", + ], + "tests": [ + "tests/layout/reftests/reftest-qr.list", + ], + }, + "crashtest": { + "run_filename": "remotereftest.py", + "testsdir": "reftest", + "options": [ + "--app=%(app)s", + "--ignore-window-size", + "--remote-webserver=%(remote_webserver)s", + "--xre-path=%(xre_path)s", + "--utility-path=%(utility_path)s", + "--http-port=%(http_port)s", + "--ssl-port=%(ssl_port)s", + "--httpd-path", + "%(modules_dir)s", + "--symbols-path=%(symbols_path)s", + "--suite=crashtest", + "--log-errorsummary=%(error_summary_file)s", + "--log-tbpl-level=%(log_tbpl_level)s", + "--deviceSerial=%(device_serial)s", + "--topsrcdir=tests", + ], + "tests": [ + "tests/testing/crashtest/crashtests.list", + ], + }, + "crashtest-qr": { + "run_filename": "remotereftest.py", + "testsdir": "reftest", + "options": [ + "--app=%(app)s", + "--ignore-window-size", + "--remote-webserver=%(remote_webserver)s", + "--xre-path=%(xre_path)s", + "--utility-path=%(utility_path)s", + "--http-port=%(http_port)s", + "--ssl-port=%(ssl_port)s", + "--httpd-path", + "%(modules_dir)s", + "--symbols-path=%(symbols_path)s", + "--suite=crashtest", + "--log-errorsummary=%(error_summary_file)s", + "--log-tbpl-level=%(log_tbpl_level)s", + "--deviceSerial=%(device_serial)s", + "--topsrcdir=tests", + ], + "tests": [ + "tests/testing/crashtest/crashtests-qr.list", + ], + }, + "jittest": { + "run_filename": "jit_test.py", + "testsdir": "jit-test/jit-test", + "options": [ + "../../bin/js", + "--remote", + "-j", + "1", + "--localLib=../../bin", + "--no-slow", + "--no-progress", + "--format=automation", + "--jitflags=%(jittest_flags)s", + "--deviceSerial=%(device_serial)s", + ], + }, + "jsreftest": { + "run_filename": "remotereftest.py", + "testsdir": "reftest", + "options": [ + "--app=%(app)s", + "--ignore-window-size", + "--remote-webserver=%(remote_webserver)s", + "--xre-path=%(xre_path)s", + "--utility-path=%(utility_path)s", + "--http-port=%(http_port)s", + "--ssl-port=%(ssl_port)s", + "--httpd-path", + "%(modules_dir)s", + "--symbols-path=%(symbols_path)s", + "--extra-profile-file=jsreftest/tests/js/src/tests/user.js", + "--suite=jstestbrowser", + "--log-errorsummary=%(error_summary_file)s", + "--log-tbpl-level=%(log_tbpl_level)s", + "--deviceSerial=%(device_serial)s", + "--topsrcdir=../jsreftest/tests", + ], + "tests": [ + "../jsreftest/tests/js/src/tests/jstests.list", + ], + }, + "xpcshell": { + "run_filename": "remotexpcshelltests.py", + "testsdir": "xpcshell", + "options": [ + "--xre-path=%(xre_path)s", + "--testing-modules-dir=%(modules_dir)s", + "--apk=%(installer_path)s", + "--no-logfiles", + "--symbols-path=%(symbols_path)s", + "--manifest=tests/xpcshell.ini", + "--log-errorsummary=%(error_summary_file)s", + "--log-tbpl-level=%(log_tbpl_level)s", + "--threads=4", + "--deviceSerial=%(device_serial)s", + "%(xpcshell_extra)s", + ], + }, + "cppunittest": { + "run_filename": "remotecppunittests.py", + "testsdir": "cppunittest", + "install": False, + "options": [ + "--symbols-path=%(symbols_path)s", + "--xre-path=%(xre_path)s", + "--localBinDir=../bin", + "--apk=%(installer_path)s", + ".", + "--deviceSerial=%(device_serial)s", + "--log-errorsummary=%(error_summary_file)s", + ], + }, + "geckoview-junit": { + "run_filename": "runjunit.py", + "testsdir": "mochitest", + "options": [ + "--certificate-path=%(certs_path)s", + "--remote-webserver=%(remote_webserver)s", + "--symbols-path=%(symbols_path)s", + "--utility-path=%(utility_path)s", + "--deviceSerial=%(device_serial)s", + ], + }, + "gtest": { + "run_filename": "remotegtests.py", + "testsdir": "gtest", + "install": True, + "options": [ + "--symbols-path=%(symbols_path)s", + "--tests-path=%(gtest_dir)s", + "--libxul=%(gtest_dir)s/gtest_bin/gtest/libxul.so", + "--package=%(app)s", + "--deviceSerial=%(device_serial)s", + ], + }, + }, # end suite_definitions +} |