From e9c9f169e3fc0a8c86b831fd5e78e324fa037c91 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 18 Jun 2015 04:29:31 +0300 Subject: test/toolkit.py: capture stderr --- test/toolkit.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/toolkit.py b/test/toolkit.py index f2c0a3e..ad5afef 100644 --- a/test/toolkit.py +++ b/test/toolkit.py @@ -87,9 +87,11 @@ class Tools: cmd_list.extend(args) logging.info('Trying to execute: {0}'.format(subprocess.list2cmdline(cmd_list))) try: - output = subprocess.check_output(cmd_list, universal_newlines=True) + output = subprocess.check_output(cmd_list, universal_newlines=True, + stderr=subprocess.STDOUT) except subprocess.CalledProcessError as e: logging.exception(e) + logging.error('Output:\n' + e.output) raise ToolkitError() from e logging.info('Output:\n' + output) return output.split() -- cgit v1.2.3