| 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 file, |
| 3 |
# You can obtain one at http://mozilla.org/MPL/2.0/. |
| 4 |
|
| 5 |
# This is a template config file for web-platform-tests test. |
| 6 |
|
| 7 |
import os |
| 8 |
import sys |
| 9 |
|
| 10 |
# OS Specifics |
| 11 |
DISABLE_SCREEN_SAVER = False |
| 12 |
ADJUST_MOUSE_AND_SCREEN = True |
| 13 |
##### |
| 14 |
|
| 15 |
REQUIRE_GPU = False |
| 16 |
if "REQUIRE_GPU" in os.environ: |
| 17 |
REQUIRE_GPU = os.environ["REQUIRE_GPU"] == "1" |
| 18 |
|
| 19 |
config = { |
| 20 |
"options": [ |
| 21 |
"--prefs-root=%(test_path)s\\prefs", |
| 22 |
"--config=%(test_path)s\\wptrunner.ini", |
| 23 |
"--ca-cert-path=%(test_path)s\\tests\\tools\\certs\\cacert.pem", |
| 24 |
"--host-key-path=%(test_path)s\\tests\\tools\\certs\\web-platform.test.key", |
| 25 |
"--host-cert-path=%(test_path)s\\tests\\tools\\certs\\web-platform.test.pem", |
| 26 |
"--certutil-binary=%(test_install_path)s\\bin\\certutil.exe", |
| 27 |
], |
| 28 |
"exes": { |
| 29 |
"python": sys.executable, |
| 30 |
"hg": "c:\\mozilla-build\\hg\\hg", |
| 31 |
}, |
| 32 |
"geckodriver": os.path.join("%(abs_fetches_dir)s", "geckodriver.exe"), |
| 33 |
"per_test_category": "web-platform", |
| 34 |
"run_cmd_checks_enabled": True, |
| 35 |
"preflight_run_cmd_suites": [ |
| 36 |
# NOTE 'enabled' is only here while we have unconsolidated configs |
| 37 |
{ |
| 38 |
"name": "disable_screen_saver", |
| 39 |
"cmd": ["xset", "s", "off", "s", "reset"], |
| 40 |
"architectures": ["32bit", "64bit"], |
| 41 |
"halt_on_failure": False, |
| 42 |
"enabled": DISABLE_SCREEN_SAVER, |
| 43 |
}, |
| 44 |
{ |
| 45 |
"name": "run mouse & screen adjustment script", |
| 46 |
"cmd": [ |
| 47 |
# when configs are consolidated this python path will only show |
| 48 |
# for windows. |
| 49 |
sys.executable, |
| 50 |
"..\\scripts\\external_tools\\mouse_and_screen_resolution.py", |
| 51 |
"--configuration-file", |
| 52 |
"..\\scripts\\external_tools\\machine-configuration.json", |
| 53 |
], |
| 54 |
"architectures": ["32bit"], |
| 55 |
"halt_on_failure": True, |
| 56 |
"enabled": ADJUST_MOUSE_AND_SCREEN, |
| 57 |
}, |
| 58 |
{ |
| 59 |
"name": "ensure proper graphics driver", |
| 60 |
"cmd": [ |
| 61 |
"powershell", |
| 62 |
"-command", |
| 63 |
'if (-Not ((Get-CimInstance win32_VideoController).InstalledDisplayDrivers | Out-String).contains("nvgrid")) { echo "Missing nvgrid driver: " + (Get-CimInstance win32_VideoController).InstalledDisplayDrivers; exit 4; }', |
| 64 |
], |
| 65 |
"architectures": ["32bit", "64bit"], |
| 66 |
"halt_on_failure": True, |
| 67 |
"enabled": True if REQUIRE_GPU else False, |
| 68 |
"fatal_exit_code": 4, |
| 69 |
}, |
| 70 |
], |
| 71 |
} |