Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions tools/runners/run-test-suite-test262.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,6 @@ def main(args):
util.set_timezone('Pacific Standard Time')

command = (args.runtime + ' ' + args.engine).strip()
if args.es2015 or args.esnext:
try:
subprocess.check_output(["timeout", "--version"])
command = "timeout 5 " + command
except subprocess.CalledProcessError:
pass

kwargs = {}
if sys.version_info.major >= 3:
Expand Down
10 changes: 9 additions & 1 deletion tools/runners/test262-harness.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
from collections import Counter

import signal
import threading
import multiprocessing

#######################################################################
Expand All @@ -65,6 +66,10 @@
M_YAML_MULTILINE_LIST = re.compile(r"^ *- (.*)$")


# The timeout of each test case
TEST262_CASE_TIMEOUT = 5


def yaml_load(string):
return my_read_dict(string.splitlines())[1]

Expand Down Expand Up @@ -595,11 +600,14 @@ def execute(command):
logging.info("exec: %s", str(args))
process = subprocess.Popen(
args,
shell=is_windows(),
shell=False,
stdout=stdout.file_desc,
stderr=stderr.file_desc
)
timer = threading.Timer(TEST262_CASE_TIMEOUT, process.kill)
timer.start()
code = process.wait()
timer.cancel()
out = stdout.read()
err = stderr.read()
finally:
Expand Down