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

Function init

test/browser_common.py:136–150  ·  view source on GitHub ↗
(force_browser_process_termination)

Source from the content-addressed store, hash-verified

134
135
136def init(force_browser_process_termination):
137 utils.delete_file(browser_spawn_lock_filename)
138 utils.delete_file(f'{browser_spawn_lock_filename}_counter')
139 if force_browser_process_termination or os.getenv('EMTEST_FORCE_BROWSER_PROCESS_TERMINATION'):
140 config = get_browser_config()
141
142 if config and hasattr(config, 'executable_name'):
143 def terminate_all_browser_processes():
144 procs = list_processes_by_name(config.executable_name)
145 if len(procs) > 0:
146 print(f'Terminating {len(procs)} stray browser processes.')
147 terminate_list_of_processes(procs)
148
149 atexit.register(terminate_all_browser_processes)
150 terminate_all_browser_processes()
151
152
153def find_browser_test_file(filename):

Callers 3

setUpFunction · 0.70
FooMethod · 0.70

Calls 2

get_browser_configFunction · 0.85

Tested by 2

setUpFunction · 0.56
FooMethod · 0.56