From 45bf6b3af1a5498d6e913734b6e851f146eb3b6b Mon Sep 17 00:00:00 2001 From: juj Date: Sat, 8 Nov 2025 13:15:05 +0200 Subject: [PATCH 1/2] Fix passing MIN_x_VERSION in EMCC_CFLAGS when running with EMTEST_AUTOSKIP=1. --- test/test_browser.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/test_browser.py b/test/test_browser.py index 1686fd3cd9c2e..64928a915f89c 100644 --- a/test/test_browser.py +++ b/test/test_browser.py @@ -6,6 +6,7 @@ import argparse import os import random +import re import shlex import shutil import subprocess @@ -236,8 +237,15 @@ def decorator(f): def decorated(self, *args, **kwargs): if should_skip == 'error': raise Exception(f'This test requires a browser that supports {feature.name} but your browser {get_browser()} does not support this. Run with {skip_env_var}=1 or EMTEST_AUTOSKIP=1 to skip this test automatically.') + elif should_skip and bool(re.search(r"MIN_.*_VERSION", os.getenv('EMCC_CFLAGS', ''))): + # should_skip=True, so we should skip running this test. However, user has specified a MIN_x_VERSION + # directive in EMCC_CFLAGS, so we cannot even try to compile this test, or otherwise emcc can + # error out on the MIN_x_VERSION being too old. So skip both compiling+running this test. + self.skipTest(message) elif should_skip: + # should_skip=True, so skip running this test in a browser, but do test compiling it, to get partial coverage. self.skip_exec = message + f(self, *args, **kwargs) return decorated From 64be94a7363e4efede063dfff316c09e18869ad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Sat, 8 Nov 2025 22:57:32 +0200 Subject: [PATCH 2/2] review --- test/test_browser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_browser.py b/test/test_browser.py index 64928a915f89c..18ca7709c7eb1 100644 --- a/test/test_browser.py +++ b/test/test_browser.py @@ -243,7 +243,7 @@ def decorated(self, *args, **kwargs): # error out on the MIN_x_VERSION being too old. So skip both compiling+running this test. self.skipTest(message) elif should_skip: - # should_skip=True, so skip running this test in a browser, but do test compiling it, to get partial coverage. + # Skip running this test in a browser, but do test compiling it, to get partial coverage. self.skip_exec = message f(self, *args, **kwargs)