11
13
raise Exception("Timed out: " + note)
13
15
out = map(lambda o: '' if o is None else o, out)
14
18
return '\n'.join(out) if full_output else out[0]
16
20
def run_js(filename, engine=None, args=[], check_timeout=False, stdin=None, stdout=PIPE, stderr=None, cwd=None, full_output=False):
17
21
if type(engine) is not list:
19
23
command = engine + [filename] + (['--'] if 'd8' in engine[0] or 'jsc' in engine[0] else []) + args