Repository navigation
Conversation
When Firefox is installed via Homebrew Cask on macOS (such as on GitHub Actions macos-15 runners), shutil.which('firefox') returns a wrapper shim at /opt/homebrew/bin/firefox while the app bundle lives in /Applications/Firefox.app. Resolve symlinks on exe_path, search standard macOS Firefox.app locations alongside the existing Linux /usr/lib/firefox* directories when platform.ini is not adjacent to the executable, and fall back to OLDEST_SUPPORTED_FIREFOX with a warning on all platforms instead of raising FileNotFoundError.
There was a problem hiding this comment.
Code Review
This pull request updates test/browser_common.py to improve Firefox version detection. It resolves the real path of the browser executable and searches standard installation directories on Linux and macOS for platform.ini if it is not found next to the executable, which helps support wrapper scripts and Homebrew Cask shims. There are no review comments, so I have no feedback to provide.
|
@sbc100 (or @juj ) I'm curious if we ever do firefox tests on Mac? |
sbc100
left a comment
There was a problem hiding this comment.
lgtm if juj is ok with it
- Restore prefix guards (/usr/bin/ on Linux and /opt/homebrew/ or /usr/local/ on macOS) so custom EMTEST_BROWSER paths do not fall back to unrelated system Firefox installs. - Unify candidate platform.ini lookup into a single search_dirs loop and split out the inline MACOS conditional.
When Firefox is installed via Homebrew Cask on macOS (such as on GitHub Actions macos-15 runners),
shutil.which('firefox')returns a wrapper shim at/opt/homebrew/bin/firefoxwhile the app bundle lives in/Applications/Firefox.app. Resolve symlinks onexe_path, search standard macOS Firefox.app locations alongside the existing Linux /usr/lib/firefox* directories when platform.ini is not adjacent to the executable, and fall back to OLDEST_SUPPORTED_FIREFOX with a warning on all platforms instead of raising FileNotFoundError.