From 8a579a4bcb198797c7af3d63998200670e9f9766 Mon Sep 17 00:00:00 2001
From: Rico Bergmann <rico.bergmann1@tu-dresden.de>
Date: Thu, 20 Jun 2019 15:10:51 +0200
Subject: [PATCH] Print stdout and stderr if tool failed execution

This only applies if the executed tool did return an error exit code.
Failure due to timeouts are not considered.
---
 scripts/run.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/run.py b/scripts/run.py
index fa22db8..c0db52e 100755
--- a/scripts/run.py
+++ b/scripts/run.py
@@ -73,6 +73,10 @@ def benchmark(conf):
                             file.write(output)
                     except CalledProcessError as e:
                         print("Program exited with error")
+                        print('stdout:')
+                        print(e.output)
+                        print('stderr:')
+                        print(e.stderr)
                     except subprocess.TimeoutExpired as e:
                         print("Program reached the timeout set ({0} seconds). The command we executed was '{1}'".format(e.timeout, e.cmd))
                         failed_tools.add(tool)
-- 
GitLab