From a3dc5adbf253b7fd18423193832c90ac9559c843 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Sun, 19 Jul 2020 17:44:27 +0200 Subject: [tests] print output of alloc bench when dummy test fails --- tests/integration/test_benchmarks.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/integration/test_benchmarks.py b/tests/integration/test_benchmarks.py index a3b8ef7..cde92c1 100644 --- a/tests/integration/test_benchmarks.py +++ b/tests/integration/test_benchmarks.py @@ -27,9 +27,14 @@ class TestDummy(unittest.TestCase): def test_execution(self): """Test if it executes successfully and outputs something""" cmd = './bench.py -b dummy -a system_default -r 1 -vv' - res = subprocess.check_output(cmd.split(), - text=True, - stderr=subprocess.STDOUT) + try: + res = subprocess.check_output(cmd.split(), + text=True, + stderr=subprocess.STDOUT) + except subprocess.CalledProcessError as e: + print(e.stdout) + print(e.stderr) + raise # allocbench should output something self.assertNotEqual(res, "") -- cgit v1.2.3