Skip to content

Commit 317f212

Browse files
authored
Fix test browser configuring. (#25258)
Fix two problems with test browser configuring refactor: 1. Each run of non-browser suites would print `"No EMTEST_BROWSER set. Defaulting to google-chrome"`. Simplest way is to remove this print. There is already a print `logger.info('Launching browser: %s', str(browser_args))` later down the line, so it should be fairly explicit what browser cmdline is being run. 2. if user has no EMTEST_BROWSER set, then on Windows line 2479 would throw on the `'"' not in EMTEST_BROWSER` check, when `EMTEST_BROWSER` was still `None`.
1 parent 107c791 commit 317f212

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

test/common.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2476,17 +2476,16 @@ def configure_test_browser():
24762476
if not has_browser():
24772477
return
24782478

2479+
if not EMTEST_BROWSER:
2480+
EMTEST_BROWSER = 'google-chrome'
2481+
24792482
if WINDOWS and '"' not in EMTEST_BROWSER and "'" not in EMTEST_BROWSER:
24802483
# On Windows env. vars canonically use backslashes as directory delimiters, e.g.
24812484
# set EMTEST_BROWSER=C:\Program Files\Mozilla Firefox\firefox.exe
24822485
# and spaces are not escaped. But make sure to also support args, e.g.
24832486
# set EMTEST_BROWSER="C:\Users\clb\AppData\Local\Google\Chrome SxS\Application\chrome.exe" --enable-unsafe-webgpu
24842487
EMTEST_BROWSER = '"' + EMTEST_BROWSER.replace("\\", "\\\\") + '"'
24852488

2486-
if not EMTEST_BROWSER:
2487-
logger.info('No EMTEST_BROWSER set. Defaulting to `google-chrome`')
2488-
EMTEST_BROWSER = 'google-chrome'
2489-
24902489
if EMTEST_BROWSER_AUTO_CONFIG:
24912490
config = None
24922491
if is_chrome():

0 commit comments

Comments
 (0)