Skip to content

Commit 7bd4abc

Browse files
authored
Fix Firefox browser test runner on macOS. (#25790)
On macOS the directory structure of application bundles is a bit different than the directory structure of Firefox on Windows and Linux, so platform.ini is found in the Resources directory instead of next to firefox.exe.
1 parent f8611eb commit 7bd4abc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/browser_common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
from tools import feature_matrix, shared, utils
3838
from tools.feature_matrix import UNSUPPORTED
3939
from tools.shared import DEBUG, EMCC, exit_with_error
40-
from tools.utils import WINDOWS, memoize, path_from_root, read_binary
40+
from tools.utils import MACOS, WINDOWS, memoize, path_from_root, read_binary
4141

4242
logger = logging.getLogger('common')
4343

@@ -166,7 +166,7 @@ def get_firefox_version():
166166
if not is_firefox():
167167
return UNSUPPORTED
168168
exe_path = shlex.split(EMTEST_BROWSER)[0]
169-
ini_path = os.path.join(os.path.dirname(exe_path), "platform.ini")
169+
ini_path = os.path.join(os.path.dirname(exe_path), '../Resources/platform.ini' if MACOS else 'platform.ini')
170170
# Extract the first numeric part before any dot (e.g. "Milestone=102.15.1" → 102)
171171
m = re.search(r"^Milestone=(.*)$", read_file(ini_path), re.MULTILINE)
172172
milestone = m.group(1).strip()

0 commit comments

Comments
 (0)