Skip to content

Commit 35632d6

Browse files
authored
Add an optimized variant of test_split_module (#22833)
This ensures that the test works on optimized binaries with export minification.
1 parent 4171ae2 commit 35632d6

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

test/test_other.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12898,13 +12898,19 @@ def test_syscall_stubs(self):
1289812898
self.do_other_test('test_syscall_stubs.c')
1289912899

1290012900
@parameterized({
12901-
'': (False, False),
12902-
'custom': (True, False),
12903-
'jspi': (False, True),
12901+
'': (False, False, False),
12902+
'custom': (True, False, False),
12903+
'jspi': (False, True, False),
12904+
'O3': (False, False, True)
1290412905
})
12905-
def test_split_module(self, customLoader, jspi):
12906+
def test_split_module(self, customLoader, jspi, opt):
1290612907
self.set_setting('SPLIT_MODULE')
12907-
self.emcc_args += ['-g', '-Wno-experimental']
12908+
self.emcc_args += ['-Wno-experimental']
12909+
if opt:
12910+
# Test that it works in the presence of export minification
12911+
self.emcc_args += ['-O3']
12912+
else:
12913+
self.emcc_args += ['-g']
1290812914
self.emcc_args += ['--post-js', test_file('other/test_split_module.post.js')]
1290912915
if customLoader:
1291012916
self.emcc_args += ['--pre-js', test_file('other/test_load_split_module.pre.js')]

0 commit comments

Comments
 (0)