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

Method test_emconfig

test/test_sanity.py:538–550  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

536 self.assertTrue(os.path.exists(os.path.join(cache_dir_name, 'sysroot')))
537
538 def test_emconfig(self):
539 restore_and_set_up()
540 create_file('custom_config', get_basic_config())
541
542 # Make a syntax error in the original config file so that attempting to access it would fail.
543 utils.write_file(EM_CONFIG, 'asdfasdfasdfasdf\n')
544
545 # Test both relative and absolute paths to the config
546 self.run_process([EMCC, '--em-config', os.path.abspath('custom_config'), *MINIMAL_HELLO_WORLD])
547 self.assertContained('Hello, world!', self.run_js('a.out.js'))
548
549 self.run_process([EMCC, '--em-config', 'custom_config', *MINIMAL_HELLO_WORLD])
550 self.assertContained('Hello, world!', self.run_js('a.out.js'))
551
552 def test_emcc_ports(self):
553 restore_and_set_up()

Callers

nothing calls this directly

Calls 7

create_fileFunction · 0.90
restore_and_set_upFunction · 0.85
get_basic_configFunction · 0.85
write_fileMethod · 0.80
run_processMethod · 0.80
assertContainedMethod · 0.80
run_jsMethod · 0.80

Tested by

no test coverage detected