aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorjuraj.linkes <juraj.linkes@pantheon.tech>2018-11-21 13:13:39 +0100
committerDamjan Marion <dmarion@me.com>2018-11-23 13:36:06 +0000
commit3d9b92a0c56c3cbe51e75bc3cb40d3d2db2d3720 (patch)
tree18ab6aacf9c41144e9345688c964bab8705b4644 /test
parent7303ee837962a9bbfba2c092625d7285bf9f5c98 (diff)
Fix test logging propagation
When running tests with child processes the logs from child processes would propagate to root logger, potentially resulting in some logs being emitted twice. Fix this by disabling log propagation to parent loggers in child processes. Change-Id: I31eb265c2b7f7bceff627043956a67d6def3da2b Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
Diffstat (limited to 'test')
-rw-r--r--test/framework.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/framework.py b/test/framework.py
index 4c536e062b0..4f830ba613e 100644
--- a/test/framework.py
+++ b/test/framework.py
@@ -379,6 +379,7 @@ class VppTestCase(unittest.TestCase):
cls.logger = get_logger(cls.__name__)
if hasattr(cls, 'parallel_handler'):
cls.logger.addHandler(cls.parallel_handler)
+ cls.logger.propagate = False
cls.tempdir = tempfile.mkdtemp(
prefix='vpp-unittest-%s-' % cls.__name__)
cls.stats_sock = "%s/stats.sock" % cls.tempdir