mirror of
https://gitlab.com/manzerbredes/esds.git
synced 2025-04-19 03:59:45 +00:00
Making esds compatible with python 3.7
This commit is contained in:
parent
d908a5f832
commit
2eafcaabbd
3 changed files with 6 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import os, subprocess, time
|
||||
import os, subprocess, time,sys
|
||||
|
||||
##### Setup Variables
|
||||
tests_timeout=20 # Max duration of a test
|
||||
|
@ -15,7 +15,7 @@ for file in os.listdir(tests_path):
|
|||
print("- %-40s%s " % (file,"=>"),end='')
|
||||
try:
|
||||
start_at=time.time()
|
||||
out=subprocess.check_output(simulator_path, stderr=subprocess.STDOUT,timeout=tests_timeout).decode("utf-8")
|
||||
out=subprocess.check_output([sys.executable, simulator_path], stderr=subprocess.STDOUT,timeout=tests_timeout,encoding="utf-8")
|
||||
out_expected=open(out_path).read()
|
||||
end_at=time.time()
|
||||
if out_expected != out:
|
||||
|
@ -29,12 +29,12 @@ for file in os.listdir(tests_path):
|
|||
except subprocess.TimeoutExpired as err:
|
||||
print("failed :(")
|
||||
print("------------- Test timeout (should not exceed "+str(tests_timeout)+"s) -------------")
|
||||
print(err.output.decode("utf-8"),end="")
|
||||
print(err.output,end="")
|
||||
exit(1)
|
||||
except subprocess.CalledProcessError as err:
|
||||
print("failed :(")
|
||||
print("------------- Non test has a non-zero exit code -------------")
|
||||
print(err.output.decode("utf-8"),end="")
|
||||
print(err.output,end="")
|
||||
exit(2)
|
||||
except Exception as err:
|
||||
print("failed :(")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue