X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Fframework.py;h=3c4aacb635498359c2ff23053dec1035cfefda52;hb=ccfead6e12f5d5a124e1e279a5b74361e00e2de8;hp=06876a1799b1c8529f3d82dcd238f49786243c86;hpb=dd4b2bb39491cb8fbfb5db8a4b9ffc3b80beba48;p=vpp.git diff --git a/test/framework.py b/test/framework.py index 06876a1799b..3c4aacb6354 100644 --- a/test/framework.py +++ b/test/framework.py @@ -151,6 +151,7 @@ class KeepAliveReporter(object): def __init__(self): self.__dict__ = self._shared_state + self._pipe = None @property def pipe(self): @@ -158,7 +159,7 @@ class KeepAliveReporter(object): @pipe.setter def pipe(self, pipe): - if hasattr(self, '_pipe'): + if self._pipe is not None: raise Exception("Internal error - pipe should only be set once.") self._pipe = pipe @@ -378,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 @@ -1253,8 +1255,7 @@ class VppTestRunner(unittest.TextTestRunner): super(VppTestRunner, self).__init__(sys.stdout, descriptions, verbosity, failfast, buffer, resultclass) - reporter = KeepAliveReporter() - reporter.pipe = keep_alive_pipe + KeepAliveReporter.pipe = keep_alive_pipe VppTestResult.test_framework_result_pipe = result_pipe