From ae8d332699685a8527fe42eb9be0bca4d639d5c3 Mon Sep 17 00:00:00 2001 From: Dave Wallace Date: Tue, 18 May 2021 17:12:16 -0400 Subject: tests: don't buffer worker stdin/stdout - Required to get VCLAppWorker stdin / stdout data into log.txt when a test fails. Type: test Change-Id: I4db467986940f701750aec6d842a4d9aee22b4e6 Signed-off-by: Dave Wallace --- test/framework.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) mode change 100644 => 100755 test/framework.py (limited to 'test') diff --git a/test/framework.py b/test/framework.py old mode 100644 new mode 100755 index dcea2e74d62..0acc1603bd4 --- a/test/framework.py +++ b/test/framework.py @@ -1727,8 +1727,9 @@ class Worker(Thread): env.update(self.env) env["CK_LOG_FILE_NAME"] = "-" self.process = subprocess.Popen( - self.args, shell=False, env=env, preexec_fn=os.setpgrp, - stdout=subprocess.PIPE, stderr=subprocess.PIPE) + ['stdbuf', '-o0', '-e0'] + self.args, shell=False, env=env, + preexec_fn=os.setpgrp, stdout=subprocess.PIPE, + stderr=subprocess.PIPE) self.wait_for_enter() out, err = self.process.communicate() self.logger.debug("Finished running `{app}'".format(app=self.app_name)) -- cgit 1.2.3-korg