test: Print stderr when subprocess fails

This commit is contained in:
MarcoFalke 2019-12-04 10:28:09 -05:00
parent 2222c30586
commit fa69cef13e
No known key found for this signature in database
GPG key ID: CE2B75697E69A548

View file

@ -12,6 +12,7 @@ import os
import pdb
import random
import shutil
import subprocess
import sys
import tempfile
import time
@ -121,6 +122,9 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
except KeyError:
self.log.exception("Key error")
self.success = TestStatus.FAILED
except subprocess.CalledProcessError as e:
self.log.exception("Called Process failed with '{}'".format(e.output))
self.success = TestStatus.FAILED
except Exception:
self.log.exception("Unexpected exception caught during testing")
self.success = TestStatus.FAILED