Skip to content

Commit

Permalink
Add an optimized variant of test_split_module (#22833)
Browse files Browse the repository at this point in the history
This ensures that the test works on optimized binaries with export
minification.
  • Loading branch information
dschuff authored Nov 4, 2024
1 parent 4171ae2 commit 35632d6
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions test/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -12898,13 +12898,19 @@ def test_syscall_stubs(self):
self.do_other_test('test_syscall_stubs.c')

@parameterized({
'': (False, False),
'custom': (True, False),
'jspi': (False, True),
'': (False, False, False),
'custom': (True, False, False),
'jspi': (False, True, False),
'O3': (False, False, True)
})
def test_split_module(self, customLoader, jspi):
def test_split_module(self, customLoader, jspi, opt):
self.set_setting('SPLIT_MODULE')
self.emcc_args += ['-g', '-Wno-experimental']
self.emcc_args += ['-Wno-experimental']
if opt:
# Test that it works in the presence of export minification
self.emcc_args += ['-O3']
else:
self.emcc_args += ['-g']
self.emcc_args += ['--post-js', test_file('other/test_split_module.post.js')]
if customLoader:
self.emcc_args += ['--pre-js', test_file('other/test_load_split_module.pre.js')]
Expand Down

0 comments on commit 35632d6

Please sign in to comment.