Debian Codegraph @

testing/mozharness/configs/unittests/mac_unittest.py

raw
1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4
5 import os
6 import sys
7
8 # OS Specifics
9 INSTALLER_PATH = os.path.join(os.getcwd(), "installer.dmg")
10 NODEJS_PATH = None
11 if "MOZ_FETCHES_DIR" in os.environ:
12 NODEJS_PATH = os.path.join(os.environ["MOZ_FETCHES_DIR"], "node/bin/node")
13
14 XPCSHELL_NAME = "xpcshell"
15 HTTP3SERVER_NAME = "http3server"
16 EXE_SUFFIX = ""
17 #####
18 config = {
19 "virtualenv_modules": ["six==1.16.0", "vcversioner==2.16.0.0"],
20 ###
21 "installer_path": INSTALLER_PATH,
22 "xpcshell_name": XPCSHELL_NAME,
23 "http3server_name": HTTP3SERVER_NAME,
24 "exe_suffix": EXE_SUFFIX,
25 "run_file_names": {
26 "mochitest": "runtests.py",
27 "reftest": "runreftest.py",
28 "xpcshell": "runxpcshelltests.py",
29 "cppunittest": "runcppunittests.py",
30 "gtest": "rungtests.py",
31 "jittest": "jit_test.py",
32 },
33 "minimum_tests_zip_dirs": [
34 "bin/*",
35 "certs/*",
36 "config/*",
37 "mach",
38 "marionette/*",
39 "modules/*",
40 "mozbase/*",
41 "tools/*",
42 ],
43 "suite_definitions": {
44 "cppunittest": {
45 "options": [
46 "--symbols-path=%(symbols_path)s",
47 "--utility-path=tests/bin",
48 "--xre-path=%(abs_res_dir)s",
49 ],
50 "run_filename": "runcppunittests.py",
51 "testsdir": "cppunittest",
52 },
53 "jittest": {
54 "options": [
55 "tests/bin/js",
56 "--no-slow",
57 "--no-progress",
58 "--format=automation",
59 "--jitflags=all",
60 "--timeout=970", # Keep in sync with run_timeout below.
61 ],
62 "run_filename": "jit_test.py",
63 "testsdir": "jit-test/jit-test",
64 "run_timeout": 1000, # Keep in sync with --timeout above.
65 },
66 "mochitest": {
67 "options": [
68 "--appname=%(binary_path)s",
69 "--utility-path=tests/bin",
70 "--extra-profile-file=tests/bin/plugins",
71 "--symbols-path=%(symbols_path)s",
72 "--certificate-path=tests/certs",
73 "--quiet",
74 "--log-errorsummary=%(error_summary_file)s",
75 "--screenshot-on-fail",
76 "--cleanup-crashes",
77 "--marionette-startup-timeout=180",
78 "--sandbox-read-whitelist=%(abs_work_dir)s",
79 ],
80 "run_filename": "runtests.py",
81 "testsdir": "mochitest",
82 },
83 "reftest": {
84 "options": [
85 "--appname=%(binary_path)s",
86 "--utility-path=tests/bin",
87 "--extra-profile-file=tests/bin/plugins",
88 "--symbols-path=%(symbols_path)s",
89 "--log-errorsummary=%(error_summary_file)s",
90 "--cleanup-crashes",
91 "--marionette-startup-timeout=180",
92 "--sandbox-read-whitelist=%(abs_work_dir)s",
93 ],
94 "run_filename": "runreftest.py",
95 "testsdir": "reftest",
96 },
97 "xpcshell": {
98 "options": [
99 "--self-test",
100 "--symbols-path=%(symbols_path)s",
101 "--log-errorsummary=%(error_summary_file)s",
102 "--utility-path=tests/bin",
103 ],
104 "run_filename": "runxpcshelltests.py",
105 "testsdir": "xpcshell",
106 },
107 "gtest": {
108 "options": [
109 "--xre-path=%(abs_res_dir)s",
110 "--cwd=%(gtest_dir)s",
111 "--symbols-path=%(symbols_path)s",
112 "--utility-path=tests/bin",
113 "%(binary_path)s",
114 ],
115 "run_filename": "rungtests.py",
116 },
117 },
118 # local mochi suites
119 "all_mochitest_suites": {
120 "mochitest-plain": ["--chunk-by-dir=4"],
121 "mochitest-plain-gpu": ["--subsuite=gpu"],
122 "mochitest-media": ["--subsuite=media"],
123 "mochitest-chrome": ["--flavor=chrome", "--chunk-by-dir=4", "--disable-e10s"],
124 "mochitest-chrome-gpu": ["--flavor=chrome", "--subsuite=gpu", "--disable-e10s"],
125 "mochitest-browser-chrome": ["--flavor=browser", "--chunk-by-runtime"],
126 "mochitest-browser-screenshots": [
127 "--flavor=browser",
128 "--subsuite=screenshots",
129 ],
130 "mochitest-webgl1-core": ["--subsuite=webgl1-core"],
131 "mochitest-webgl1-ext": ["--subsuite=webgl1-ext"],
132 "mochitest-webgl2-core": ["--subsuite=webgl2-core"],
133 "mochitest-webgl2-ext": ["--subsuite=webgl2-ext"],
134 "mochitest-webgl2-deqp": ["--subsuite=webgl2-deqp"],
135 "mochitest-webgpu": ["--subsuite=webgpu"],
136 "mochitest-devtools-chrome": [
137 "--flavor=browser",
138 "--subsuite=devtools",
139 "--chunk-by-runtime",
140 ],
141 "mochitest-browser-a11y": ["--flavor=browser", "--subsuite=a11y"],
142 "mochitest-browser-media": ["--flavor=browser", "--subsuite=media-bc"],
143 "mochitest-browser-translations": [
144 "--flavor=browser",
145 "--subsuite=translations",
146 ],
147 "mochitest-a11y": ["--flavor=a11y", "--disable-e10s"],
148 "mochitest-remote": ["--flavor=browser", "--subsuite=remote"],
149 },
150 # local reftest suites
151 "all_reftest_suites": {
152 "crashtest": {
153 "options": ["--suite=crashtest", "--topsrcdir=tests/reftest/tests"],
154 "tests": ["tests/reftest/tests/testing/crashtest/crashtests.list"],
155 },
156 "jsreftest": {
157 "options": [
158 "--extra-profile-file=tests/jsreftest/tests/js/src/tests/user.js",
159 "--suite=jstestbrowser",
160 "--topsrcdir=tests/jsreftest/tests",
161 ],
162 "tests": ["tests/jsreftest/tests/js/src/tests/jstests.list"],
163 },
164 "reftest": {
165 "options": ["--suite=reftest", "--topsrcdir=tests/reftest/tests"],
166 "tests": ["tests/reftest/tests/layout/reftests/reftest.list"],
167 },
168 },
169 "all_xpcshell_suites": {
170 "xpcshell": {
171 "options": [
172 "--xpcshell=%(abs_app_dir)s/" + XPCSHELL_NAME,
173 "--http3server=%(abs_app_dir)s/" + HTTP3SERVER_NAME,
174 "--manifest=tests/xpcshell/tests/xpcshell.toml",
175 ],
176 "tests": [],
177 },
178 },
179 "all_cppunittest_suites": {"cppunittest": ["tests/cppunittest"]},
180 "all_gtest_suites": {"gtest": []},
181 "all_jittest_suites": {"jittest": [], "jittest-chunked": []},
182 "run_cmd_checks_enabled": True,
183 "preflight_run_cmd_suites": [
184 # NOTE 'enabled' is only here while we have unconsolidated configs
185 {
186 "name": "disable_screen_saver",
187 "cmd": [
188 "defaults",
189 "-currentHost",
190 "write",
191 "com.apple.screensaver",
192 "idleTime",
193 "0",
194 ],
195 "architectures": ["32bit", "64bit"],
196 "halt_on_failure": False,
197 "enabled": True,
198 },
199 {
200 "name": "disable_dock",
201 "cmd": ["defaults", "write", "com.apple.dock", "autohide", "-bool", "true"],
202 "architectures": ["64bit"],
203 "halt_on_failure": True,
204 "enabled": True,
205 },
206 {
207 "name": "kill_dock",
208 "cmd": ["killall", "Dock"],
209 "architectures": ["64bit"],
210 "halt_on_failure": True,
211 "enabled": True,
212 },
213 {
214 "name": "verify refresh rate",
215 "cmd": [
216 sys.executable,
217 os.path.join(
218 os.getcwd(),
219 "mozharness",
220 "external_tools",
221 "macosx_resolution_refreshrate.py",
222 ),
223 "--check=refresh-rate",
224 ],
225 "architectures": ["64bit"],
226 "halt_on_failure": True,
227 "enabled": True,
228 },
229 {
230 "name": "verify screen resolution",
231 "cmd": [
232 sys.executable,
233 os.path.join(
234 os.getcwd(),
235 "mozharness",
236 "external_tools",
237 "macosx_resolution_refreshrate.py",
238 ),
239 "--check=resolution",
240 ],
241 "architectures": ["64bit"],
242 "halt_on_failure": True,
243 "enabled": True,
244 },
245 ],
246 "vcs_output_timeout": 1000,
247 "minidump_save_path": "%(abs_work_dir)s/../minidumps",
248 "unstructured_flavors": {
249 "xpcshell": [],
250 "gtest": [],
251 "cppunittest": [],
252 "jittest": [],
253 },
254 "tooltool_cache": "/builds/tooltool_cache",
255 "nodejs_path": NODEJS_PATH,
256 }