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

Function check_engine

test/jsrun.py:53–70  ·  view source on GitHub ↗
(engine)

Source from the content-addressed store, hash-verified

51
52
53def check_engine(engine):
54 if type(engine) is list:
55 engine_path = engine[0]
56 else:
57 engine_path = engine
58 global WORKING_ENGINES
59 if engine_path not in WORKING_ENGINES:
60 logging.debug('Checking JS engine %s' % engine)
61 try:
62 output = run_js(utils.path_from_root('test/hello_world.js'), engine, skip_check=True)
63 if 'Hello, world!' in output:
64 WORKING_ENGINES[engine_path] = True
65 else:
66 WORKING_ENGINES[engine_path] = False
67 except Exception as e:
68 logging.info('Checking JS engine %s failed. Check your config file. Details: %s' % (str(engine), str(e)))
69 WORKING_ENGINES[engine_path] = False
70 return WORKING_ENGINES[engine_path]
71
72
73def require_engine(engine):

Callers 1

require_engineFunction · 0.85

Calls 2

run_jsFunction · 0.85
typeEnum · 0.50

Tested by

no test coverage detected