Ensure stdout and stderr from failed test runs are reported from run_tests.py. (flutter/engine#25758)

This commit is contained in:
Chinmay Garde
2021-04-24 19:29:01 -07:00
committed by GitHub
parent 792ff5e1c0
commit e9527be661

View File

@@ -46,7 +46,18 @@ def RunCmd(cmd, forbidden_output=[], **kwargs):
if process.returncode != 0:
PrintDivider('!')
raise Exception('Command "%s" exited with code %d' % (command_string, process.returncode))
print('Failed Command:\n\n%s\n\nExit Code: %d\n' % (command_string, process.returncode))
if stdout:
print('STDOUT: \n%s' % stdout)
if stderr:
print('STDERR: \n%s' % stderr)
PrintDivider('!')
raise Exception('Command "%s" exited with code %d.' % (command_string, process.returncode))
if stdout or stderr:
print(stdout)