diff options
author | Klement Sekera <ksekera@cisco.com> | 2017-06-07 08:19:47 +0200 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2017-06-07 17:03:37 +0000 |
commit | 3658adcadcc2e568abc985255a6cddcc4871aa87 (patch) | |
tree | 5f1400d6db050d46c7f2972bb0da8d22de6967ec /test/framework.py | |
parent | 48113e0c864fd18d9fa65eda950aa363b813bb15 (diff) |
make test: improve debugability
Introduce faulthandler to print stack trace to stderr on python crash.
Don't disable automatic garbage collection to decrease the chances of
running out of memory.
Change-Id: I6927a5f6ea9569735d084d4ed3d258950a400d74
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'test/framework.py')
-rw-r--r-- | test/framework.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/framework.py b/test/framework.py index 91915fca447..3c9dd29af0c 100644 --- a/test/framework.py +++ b/test/framework.py @@ -9,6 +9,7 @@ import unittest import tempfile import time import resource +import faulthandler from collections import deque from threading import Thread, Event from inspect import getdoc @@ -940,7 +941,7 @@ class VppTestRunner(unittest.TextTestRunner): :param test: """ - gc.disable() # disable garbage collection, we'll do that manually + faulthandler.enable() # emit stack trace to stderr if killed by signal print("Running tests using custom test runner") # debug message filter_file, filter_class, filter_func = self.parse_test_option() print("Active filters: file=%s, class=%s, function=%s" % ( |