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 <dwallacelf@gmail.com>
This commit is contained in:
Dave Wallace
2021-05-18 17:12:16 -04:00
committed by Paul Vinciguerra
parent ab755a3cf0
commit ae8d332699

5
test/framework.py Normal file → Executable file
View File

@ -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))