Skip to content

Commit fa69cef

Browse files
author
MarcoFalke
committed
test: Print stderr when subprocess fails
1 parent 2222c30 commit fa69cef

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/functional/test_framework/test_framework.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import pdb
1313
import random
1414
import shutil
15+
import subprocess
1516
import sys
1617
import tempfile
1718
import time
@@ -121,6 +122,9 @@ def main(self):
121122
except KeyError:
122123
self.log.exception("Key error")
123124
self.success = TestStatus.FAILED
125+
except subprocess.CalledProcessError as e:
126+
self.log.exception("Called Process failed with '{}'".format(e.output))
127+
self.success = TestStatus.FAILED
124128
except Exception:
125129
self.log.exception("Unexpected exception caught during testing")
126130
self.success = TestStatus.FAILED

0 commit comments

Comments
 (0)