Skip to content

Commit 71fc4c1

Browse files
authored
Ensure stdout and stderr from failed test runs are reported from run_tests.py. (flutter#25758)
1 parent a865646 commit 71fc4c1

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

testing/run_tests.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,18 @@ def RunCmd(cmd, forbidden_output=[], **kwargs):
4646

4747
if process.returncode != 0:
4848
PrintDivider('!')
49-
raise Exception('Command "%s" exited with code %d' % (command_string, process.returncode))
49+
50+
print('Failed Command:\n\n%s\n\nExit Code: %d\n' % (command_string, process.returncode))
51+
52+
if stdout:
53+
print('STDOUT: \n%s' % stdout)
54+
55+
if stderr:
56+
print('STDERR: \n%s' % stderr)
57+
58+
PrintDivider('!')
59+
60+
raise Exception('Command "%s" exited with code %d.' % (command_string, process.returncode))
5061

5162
if stdout or stderr:
5263
print(stdout)

0 commit comments

Comments
 (0)