X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Fframework.py;h=872dd45d86b4890772c3dd6c02e630dcee8d64cb;hb=d1586962a5f8f14fb81c930174d12d0453adaab8;hp=e08c9a1145c3119c77206e0f8017fe851c58d92e;hpb=4ed2598562b1fe65efe69ae53397dfe9f1f07be8;p=vpp.git diff --git a/test/framework.py b/test/framework.py index e08c9a1145c..872dd45d86b 100644 --- a/test/framework.py +++ b/test/framework.py @@ -446,8 +446,7 @@ class VppTestCase(unittest.TestCase): try: cls.vpp = subprocess.Popen(cmdline, stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - bufsize=1) + stderr=subprocess.PIPE) except subprocess.CalledProcessError as e: cls.logger.critical("Subprocess returned with non-0 return code: (" "%s)", e.returncode) @@ -1496,16 +1495,17 @@ class VppTestRunner(unittest.TextTestRunner): class Worker(Thread): - def __init__(self, args, logger, env=None): + def __init__(self, executable_args, logger, env=None, *args, **kwargs): + super(Worker, self).__init__(*args, **kwargs) self.logger = logger - self.args = args + self.args = executable_args if hasattr(self, 'testcase') and self.testcase.debug_all: if self.testcase.debug_gdbserver: self.args = ['/usr/bin/gdbserver', 'localhost:{port}' .format(port=self.testcase.gdbserver_port)] + args elif self.testcase.debug_gdb and hasattr(self, 'wait_for_gdb'): self.args.append(self.wait_for_gdb) - self.app_bin = args[0] + self.app_bin = executable_args[0] self.app_name = os.path.basename(self.app_bin) if hasattr(self, 'role'): self.app_name += ' {role}'.format(role=self.role) @@ -1513,7 +1513,6 @@ class Worker(Thread): self.result = None env = {} if env is None else env self.env = copy.deepcopy(env) - super(Worker, self).__init__() def wait_for_enter(self): if not hasattr(self, 'testcase'):