| 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 |
PYWIN32 = "pywin32==306" |
| 14 |
|
| 15 |
config = { |
| 16 |
"log_name": "raptor", |
| 17 |
"installer_path": "installer.exe", |
| 18 |
"virtualenv_path": VENV_PATH, |
| 19 |
"virtualenv_modules": [PYWIN32, "raptor", "mozinstall"], |
| 20 |
"exes": { |
| 21 |
"python": PYTHON, |
| 22 |
"mozinstall": [ |
| 23 |
"%s/scripts/python" % VENV_PATH, |
| 24 |
"%s/scripts/mozinstall-script.py" % VENV_PATH, |
| 25 |
], |
| 26 |
"hg": os.path.join(os.environ["PROGRAMFILES"], "Mercurial", "hg"), |
| 27 |
"tooltool.py": [ |
| 28 |
PYTHON, |
| 29 |
os.path.join(os.environ["MOZILLABUILD"], "tooltool.py"), |
| 30 |
], |
| 31 |
}, |
| 32 |
"title": socket.gethostname().split(".")[0], |
| 33 |
"default_actions": [ |
| 34 |
"clobber", |
| 35 |
"download-and-extract", |
| 36 |
"populate-webroot", |
| 37 |
"create-virtualenv", |
| 38 |
"install-chromium-distribution", |
| 39 |
"install", |
| 40 |
"run-tests", |
| 41 |
], |
| 42 |
"tooltool_cache": os.path.join("c:\\", "build", "tooltool_cache"), |
| 43 |
"python3_manifest": { |
| 44 |
"win32": "python3.manifest", |
| 45 |
"win64": "python3_x64.manifest", |
| 46 |
}, |
| 47 |
"env": { |
| 48 |
# python3 requires C runtime, found in firefox installation; see bug 1361732 |
| 49 |
"PATH": "%(PATH)s;c:\\slave\\test\\build\\application\\firefox;" |
| 50 |
}, |
| 51 |
"run_cmd_checks_enabled": True, |
| 52 |
"preflight_run_cmd_suites": [ |
| 53 |
{ |
| 54 |
"name": "run mouse & screen adjustment script", |
| 55 |
"cmd": [ |
| 56 |
sys.executable, |
| 57 |
os.path.join( |
| 58 |
os.getcwd(), |
| 59 |
"mozharness", |
| 60 |
"external_tools", |
| 61 |
"mouse_and_screen_resolution.py", |
| 62 |
), |
| 63 |
"--configuration-file", |
| 64 |
os.path.join( |
| 65 |
os.getcwd(), |
| 66 |
"mozharness", |
| 67 |
"external_tools", |
| 68 |
"machine-configuration.json", |
| 69 |
), |
| 70 |
"--platform", |
| 71 |
"win10-hw", |
| 72 |
], |
| 73 |
"architectures": ["32bit", "64bit"], |
| 74 |
"halt_on_failure": True, |
| 75 |
"enabled": True, |
| 76 |
}, |
| 77 |
{ |
| 78 |
"name": "ensure display refresh rate == 60", |
| 79 |
"cmd": [ |
| 80 |
"powershell", |
| 81 |
"-command", |
| 82 |
'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; }', |
| 83 |
], |
| 84 |
"architectures": ["32bit", "64bit"], |
| 85 |
"halt_on_failure": True, |
| 86 |
"enabled": True if (platform.uname().version == "10.0.22621") else False, |
| 87 |
"fatal_exit_code": 4, |
| 88 |
}, |
| 89 |
], |
| 90 |
} |