Fix the test262 timeout on Windows (#4378)

Use the platform independent python threading.Timer instead of the unix only timeout tool.

The timeout error are like the following things:

```
C:\Users\lygstate>timeout -version
Error: The specified timeout (/T) value is invalid. The valid range is from -1 to 99999 seconds.

C:\Users\lygstate>timeout 0 python
Error: invalid syntax. The default option does not allow more than '1' times.
Type "TIMEOUT /?" to learn how to use it.
```

JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
This commit is contained in:
Yonggang Luo
2021-01-16 20:41:28 +00:00
committed by GitHub
parent 1fe7c3531a
commit 2bad20abf8
2 changed files with 9 additions and 7 deletions
-6
View File
@@ -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: