Skip to content

Commit 5e9ed03

Browse files
authored
Parameterize browser.test_pthread_create. NFC (#21703)
1 parent 03b943d commit 5e9ed03

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

test/test_browser.py

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3872,19 +3872,17 @@ def test_pthread_gcc_spinlock(self):
38723872
for arg in [[], ['-DUSE_EMSCRIPTEN_INTRINSICS']]:
38733873
self.btest_exit('pthread/test_pthread_gcc_spinlock.cpp', args=['-O3', '-pthread', '-sPTHREAD_POOL_SIZE=8'] + arg)
38743874

3875-
# Test that basic thread creation works.
3876-
def test_pthread_create(self):
3877-
def test(args):
3878-
print(args)
3879-
self.btest_exit('pthread/test_pthread_create.c',
3880-
args=['-pthread', '-sPTHREAD_POOL_SIZE=8'] + args,
3881-
extra_tries=0) # this should be 100% deterministic
3882-
print() # new line
3883-
test([])
3884-
test(['-O3'])
3885-
# TODO: re-enable minimal runtime once the flakiness is figure out,
3875+
@parameterized({
3876+
'': ([],),
3877+
'O3': (['-O3'],),
3878+
# TODO: re-enable minimal runtime once the flakiness is figured out,
38863879
# https://github.com/emscripten-core/emscripten/issues/12368
3887-
# test(['-sMINIMAL_RUNTIME'])
3880+
# 'minimal_runtime': (['-sMINIMAL_RUNTIME'],),
3881+
})
3882+
def test_pthread_create(self, args):
3883+
self.btest_exit('pthread/test_pthread_create.c',
3884+
args=['-pthread', '-sPTHREAD_POOL_SIZE=8'] + args,
3885+
extra_tries=0) # this should be 100% deterministic
38883886

38893887
# Test that preallocating worker threads work.
38903888
def test_pthread_preallocates_workers(self):

0 commit comments

Comments
 (0)