Debian Codegraph @

testing/mozharness/configs/talos/windows_config.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 platform
7 import socket
8 import sys
9
10 PYTHON = sys.executable
11 VENV_PATH = os.path.join(os.getcwd(), "build/venv")
12
13 config = {
14 "log_name": "talos",
15 "installer_path": "installer.exe",
16 "virtualenv_path": VENV_PATH,
17 "exes": {
18 "python": PYTHON,
19 "hg": os.path.join(os.environ["PROGRAMFILES"], "Mercurial", "hg"),
20 "tooltool.py": [
21 PYTHON,
22 os.path.join(os.environ["MOZILLABUILD"], "tooltool.py"),
23 ],
24 },
25 "title": socket.gethostname().split(".")[0],
26 "default_actions": [
27 "clobber",
28 "download-and-extract",
29 "populate-webroot",
30 "create-virtualenv",
31 "install",
32 "run-tests",
33 ],
34 "tooltool_cache": os.path.join("c:\\", "build", "tooltool_cache"),
35 "run_cmd_checks_enabled": True,
36 "preflight_run_cmd_suites": [
37 {
38 "name": "run mouse & screen adjustment script",
39 "cmd": [
40 sys.executable,
41 os.path.join(
42 os.getcwd(),
43 "mozharness",
44 "external_tools",
45 "mouse_and_screen_resolution.py",
46 ),
47 "--configuration-file",
48 os.path.join(
49 os.getcwd(),
50 "mozharness",
51 "external_tools",
52 "machine-configuration.json",
53 ),
54 (
55 "--platform=win10-hw"
56 if (platform.uname().version == "10.0.19045")
57 else (
58 "--platform=win11-hw"
59 if (platform.uname().version == "10.0.22621")
60 else "--platform=win7"
61 )
62 ),
63 ],
64 "architectures": ["32bit", "64bit"],
65 "halt_on_failure": True,
66 "enabled": True,
67 },
68 {
69 "name": "ensure display refresh rate == 60",
70 "cmd": [
71 "powershell",
72 "-command",
73 'if (-Not ((Get-WmiObject win32_videocontroller).CurrentRefreshRate | Out-String).contains("60")) { echo "Screen refresh rate != 60: " + ((Get-WmiObject win32_videocontroller).CurrentRefreshRate | Out-String); exit 4; }',
74 ],
75 "architectures": ["32bit", "64bit"],
76 "halt_on_failure": True,
77 "enabled": True,
78 "fatal_exit_code": 4,
79 },
80 ],
81 }