MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / also_with_minimal_runtime

Function also_with_minimal_runtime

test/decorators.py:396–416  ·  view source on GitHub ↗
(func)

Source from the content-addressed store, hash-verified

394
395
396def also_with_minimal_runtime(func):
397 assert callable(func)
398
399 @wraps(func)
400 def metafunc(self, with_minimal_runtime, *args, **kwargs):
401 if DEBUG:
402 print('parameterize:minimal_runtime=%s' % with_minimal_runtime)
403 if self.get_setting('MINIMAL_RUNTIME'):
404 self.skipTest('MINIMAL_RUNTIME already enabled in test config')
405 if with_minimal_runtime:
406 if self.get_setting('MODULARIZE') == 'instance' or self.get_setting('WASM_ESM_INTEGRATION'):
407 self.skipTest('MODULARIZE=instance is not compatible with MINIMAL_RUNTIME')
408 self.set_setting('MINIMAL_RUNTIME', 1)
409 # This extra helper code is needed to cleanly handle calls to exit() which throw
410 # an ExitCode exception.
411 self.cflags += ['--pre-js', test_file('minimal_runtime_exit_handling.js')]
412 return func(self, *args, **kwargs)
413
414 parameterize(metafunc, {'': (False,),
415 'minimal_runtime': (True,)})
416 return metafunc
417
418
419def also_without_bigint(func):

Callers

nothing calls this directly

Calls 1

parameterizeFunction · 0.85

Tested by

no test coverage detected