Skip to content

Commit 5a2f125

Browse files
zijiehe-google-comcopybara-github
authored andcommitted
[fuchsia] Forward os-check and system-image-dir to run_test webpage
The image update should happen before running the web-engine-shell. Cq-Include-Trybots: luci.chrome.try:fuchsia-ava-sherlock Change-Id: I05000c3860e1ceca570d09438eebafa996908f8a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6680830 Reviewed-by: Guocheng Wei <[email protected]> Commit-Queue: Zijie He <[email protected]> Cr-Commit-Position: refs/heads/main@{#1480111} NOKEYCHECK=True GitOrigin-RevId: fef221b43dcc3d733d9a4eebf1cbc5b378cfe024
1 parent c92cce7 commit 5a2f125

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

fuchsia/test/chrome_driver_wrapper.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
import logging
88
import os
99
import subprocess
10+
import sys
1011

1112
from contextlib import AbstractContextManager
12-
from typing import List
1313

1414
# From vpython wheel.
1515
# pylint: disable=import-error
@@ -31,7 +31,7 @@ class ChromeDriverWrapper(AbstractContextManager):
3131
communicating with it. This class expects the chromedriver exists at
3232
clang_x64/stripped/chromedriver in output dir."""
3333

34-
def __init__(self, extra_args: List[str] = None):
34+
def __init__(self):
3535
# The reference of the webdriver.Chrome instance.
3636
self._driver = None
3737

@@ -44,7 +44,13 @@ def __init__(self, extra_args: List[str] = None):
4444
self._proc: subprocess.Popen = None
4545

4646
# Extra arguments sent to run_test.py webpage process.
47-
self._extra_args = extra_args or []
47+
self._extra_args = []
48+
for arg in sys.argv:
49+
# The image update should happen before running the
50+
# web_engine_shell.
51+
if (arg.startswith('--os-check=') or
52+
arg.startswith('--system-image-dir=')):
53+
self._extra_args.append(arg)
4854

4955
def __enter__(self):
5056
"""Starts the run_test.py and the chromedriver connecting to it, must be

0 commit comments

Comments
 (0)