Merge pull request #1177 from marco-c/fix_runtests

Fix runtests.py, the exit_code was being overwritten by the shell exit_c...
This commit is contained in:
Myk Melez 2015-02-27 09:11:30 -08:00
Родитель 2a53c4ecdc ce81406e05
Коммит c64f55b906
1 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -112,10 +112,13 @@ for stream in server_output_streams:
sys.stdout.write(stream.read())
p = subprocess.Popen(['js', 'jsshell.js', 'Basic'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
exit_code = 1
shell_success = False
for line in iter(p.stdout.readline, b''):
if "The end" in line:
exit_code = 0
shell_success = True
sys.stdout.write(line)
if exit_code == 0 and not shell_success:
exit_code = 1
sys.exit(exit_code)