Skip to content

Commit ce68912

Browse files
committed
Parameterize other.test_mainScriptUrlOrBlob on args instead of bool
1 parent 612de0a commit ce68912

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

test/test_other.py

+4-7
Original file line numberDiff line numberDiff line change
@@ -15866,17 +15866,14 @@ def test_rlimit(self):
1586615866
self.do_other_test('test_rlimit.c', emcc_args=['-O1'])
1586715867

1586815868
@parameterized({
15869-
'': (False,),
15870-
'es6': (True,),
15869+
'': ([],),
15870+
'es6': (['-sEXPORT_ES6', '--extern-post-js', test_file('modularize_post_js.js')],),
1587115871
})
15872-
def test_mainScriptUrlOrBlob(self, es6):
15872+
def test_mainScriptUrlOrBlob(self, args):
1587315873
# Use `foo.js` instead of the current script name when creating new threads
15874-
if es6:
15875-
self.emcc_args += ['-sEXPORT_ES6', '--extern-post-js', test_file('modularize_post_js.js')]
15876-
1587715874
create_file('pre.js', 'Module = { mainScriptUrlOrBlob: "./foo.js" }')
1587815875

15879-
self.run_process([EMCC, test_file('hello_world.c'), '-sEXIT_RUNTIME', '-sPROXY_TO_PTHREAD', '-pthread', '--pre-js=pre.js', '-o', 'a.out.js'])
15876+
self.run_process([EMCC, test_file('hello_world.c'), '-sEXIT_RUNTIME', '-sPROXY_TO_PTHREAD', '-pthread', '--pre-js=pre.js', '-o', 'a.out.js'] + args)
1588015877

1588115878
# First run without foo.js present to verify that the pthread creation fails
1588215879
err = self.run_js('a.out.js', assert_returncode=NON_ZERO)

0 commit comments

Comments
 (0)