--- a/tests/ide_tests/sikuliberemiz.py Thu Nov 10 19:31:59 2022 +0100
+++ b/tests/ide_tests/sikuliberemiz.py Thu Nov 10 19:34:44 2022 +0100
@@ -4,6 +4,7 @@
from threading import Thread, Event, Lock
from time import time as timesec
@@ -312,6 +313,41 @@
self.report.write("<pre>" + elapsed + text + "</pre>")
+ def __init__(self, beremiz_app, command): + self.app.ReportText("Launching process " + repr(command)) + self.proc = subprocess.Popen(command, stdout=subprocess.PIPE, bufsize=0) + self.app.ReportText("Launched process " + repr(command) + " PID: " + str(self.proc.pid)) + if self.proc is not None: + self.thread = Thread(target = self._waitStdoutProc).start() + def _waitStdoutProc(self): + a = self.proc.stdout.readline() + if len(a) == 0 or a is None: + self.ReportOutput("AuxStdoutFinish") + if self.proc is not None: + # self.proc.stdout.close() + self.app.ReportText("Kill process PID: " + str(proc.pid)) + os.kill(proc.pid, signal.SIGTERM) def run_test(func, *args, **kwargs):
app = BeremizApp(*args, **kwargs)