Skip to content

Commit 81bbaa4

Browse files
authored
Extend posixtest_browser test suite to automatically skip (#25882)
Extend posixtest_browser test suite to automatically skip tests when EMTEST_LACKS_SHARED_ARRAY_BUFFER=1 or EMTEST_AUTOSKIP=1 env. vars are set.
1 parent 97840e6 commit 81bbaa4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/test_posixtest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@
1414
import unittest
1515

1616
import test_posixtest_browser
17+
from browser_common import browser_should_skip_feature
1718
from common import RunnerCore, path_from_root
1819
from decorators import node_pthreads
1920

21+
from tools.feature_matrix import Feature
22+
2023
testsuite_root = path_from_root('test/third_party/posixtestsuite')
2124

2225

@@ -161,6 +164,9 @@ def make_test(name, testfile, browser):
161164
def f(self):
162165
if name in disabled:
163166
self.skipTest(disabled[name])
167+
if browser and browser_should_skip_feature('EMTEST_LACKS_SHARED_ARRAY_BUFFER', Feature.THREADS):
168+
self.skipTest('This test requires a browser with SharedArrayBuffer support')
169+
164170
args = ['-I' + os.path.join(testsuite_root, 'include'),
165171
'-Werror',
166172
'-Wno-format-security',

0 commit comments

Comments
 (0)