emscripten: pass --no-sandbox to the chrome web driver

This fixes running the Emscripten tests on Ubuntu 24.04.
This commit is contained in:
Anonymous Maarten 2025-01-22 01:07:52 +01:00
parent df3cfbc797
commit cb3cc28809
3 changed files with 22 additions and 11 deletions

View file

@ -32,6 +32,10 @@ class SDLSeleniumTestDriver:
self.failed_messages: list[str] = []
self.return_code = None
options = [
"--headless",
]
driver_contructor = None
match browser:
case "firefox":
@ -44,12 +48,9 @@ class SDLSeleniumTestDriver:
driver_options = webdriver.ChromeOptions()
if self.chrome_binary:
driver_options.binary_location = self.chrome_binary
options.append("--no-sandbox")
if driver_contructor is None:
raise ValueError(f"Invalid {browser=}")
options = [
"--headless",
]
for o in options:
driver_options.add_argument(o)
logger.debug("About to create driver")