Skip to content

Commit 52b6499

Browse files
authored
Covert a couple of EH tests to @parameterize. NFC (#27576)
Split out from #27575
1 parent 5730b7c commit 52b6499

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

test/test_other.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8806,13 +8806,13 @@ def test_lto_flags(self):
88068806
# We have LTO tests covered in 'wasmltoN' targets in test_core.py, but they
88078807
# don't run as a part of Emscripten CI, so we add a separate LTO test here.
88088808
@requires_wasm_eh
8809-
def test_lto_wasm_exceptions(self):
8809+
@parameterized({
8810+
'': (['-sWASM_LEGACY_EXCEPTIONS=0'],),
8811+
'legacy': (['-sWASM_LEGACY_EXCEPTIONS'],),
8812+
})
8813+
def test_lto_wasm_exceptions(self, args):
88108814
self.set_setting('EXCEPTION_DEBUG')
8811-
self.cflags += ['-fwasm-exceptions', '-flto']
8812-
self.set_setting('WASM_LEGACY_EXCEPTIONS', 0)
8813-
self.do_runf_out_file('core/test_exceptions.cpp', out_suffix='_caught')
8814-
self.set_setting('WASM_LEGACY_EXCEPTIONS')
8815-
self.do_runf_out_file('core/test_exceptions.cpp', out_suffix='_caught')
8815+
self.do_runf_out_file('core/test_exceptions.cpp', out_suffix='_caught', cflags=['-fwasm-exceptions', '-flto'] + args)
88168816

88178817
@parameterized({
88188818
'': ([],),
@@ -12514,14 +12514,14 @@ def test_standalone_export_main(self):
1251412514
self.run_process([EMCC, '-sEXPORTED_FUNCTIONS=_main', '-sSTANDALONE_WASM', test_file('core/test_hello_world.c')])
1251512515

1251612516
@requires_wasm_eh
12517-
def test_standalone_wasm_exceptions(self):
12517+
@parameterized({
12518+
'': (['-sWASM_LEGACY_EXCEPTIONS=0'],),
12519+
'legacy': (['-sWASM_LEGACY_EXCEPTIONS'],),
12520+
})
12521+
def test_standalone_wasm_exceptions(self, args):
1251812522
self.set_setting('STANDALONE_WASM')
1251912523
self.wasm_engines = []
12520-
self.cflags += ['-fwasm-exceptions']
12521-
self.set_setting('WASM_LEGACY_EXCEPTIONS', 0)
12522-
self.do_runf_out_file('core/test_exceptions.cpp', out_suffix='_caught')
12523-
self.set_setting('WASM_LEGACY_EXCEPTIONS')
12524-
self.do_runf_out_file('core/test_exceptions.cpp', out_suffix='_caught')
12524+
self.do_runf_out_file('core/test_exceptions.cpp', out_suffix='_caught', cflags=['-fwasm-exceptions'] + args)
1252512525

1252612526
def test_missing_malloc_export(self):
1252712527
# we used to include malloc by default. show a clear error in builds with

0 commit comments

Comments
 (0)