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

Method test_shared_flag

test/test_other.py:12299–12307  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

12297 self.assertContained('Hello, world!', self.run_js('a.out.js'))
12298
12299 def test_shared_flag(self):
12300 # Test that `-shared` flag causes wasm dylib generation
12301 self.run_process([EMCC, '-shared', '-fPIC', test_file('hello_world.c'), '-o', 'out.foo'])
12302 self.assertIsWasmDylib('out.foo')
12303
12304 # Test that `-shared` causes wasm dylib generation warning even if given executable output name.
12305 err = self.run_process([EMCC, '-shared', '-fPIC', test_file('hello_world.c'), '-o', 'out.wasm'], stderr=PIPE).stderr
12306 self.assertNotContained('warning: -shared/-r used with executable output suffix', err)
12307 self.assertIsWasmDylib('out.wasm')
12308
12309 @no_windows('windows does not support shbang syntax')
12310 @with_env_modify({'EMMAKEN_JUST_CONFIGURE': '1'})

Callers

nothing calls this directly

Calls 4

assertIsWasmDylibMethod · 0.95
test_fileFunction · 0.90
run_processMethod · 0.80
assertNotContainedMethod · 0.80

Tested by

no test coverage detected