Skip to content

Commit faa3e68

Browse files
author
MarcoFalke
committed
test: Log KeyboardInterrupt as exception
log.exception is more verbose and useful to debug timeouts. Also, log stderr for CalledProcessError to make debugging easier.
1 parent fa30b34 commit faa3e68

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

test/functional/test_framework/test_framework.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,7 @@ def main(self):
198198
self.log.warning("Test Skipped: %s" % e.message)
199199
self.success = TestStatus.SKIPPED
200200
except subprocess.CalledProcessError as e:
201-
self.log.exception("Called Process failed with '{}'".format(e.output))
202-
self.success = TestStatus.FAILED
203-
except KeyboardInterrupt:
204-
self.log.warning("Exiting after keyboard interrupt")
201+
self.log.exception(f"Called Process failed with stdout='{e.stdout}'; stderr='{e.stderr}';")
205202
self.success = TestStatus.FAILED
206203
except BaseException:
207204
self.log.exception("Unexpected exception")

0 commit comments

Comments
 (0)