ancorgs wrote:
So, for me, "worker" should probably become a Mojolicious::Lite script (just an idea).
IDK, maybe the solution is to avoid the hacky files and create a proper loop in the os-autoinst part that monitor the channel and affect to the test.
Now is something like this:
[ Worker ] -> [ os-autoinst -> Test ]
Worker is a process and os-autoinst + Test is another process. The loop in os-autoinst take care of run the test in the same process calling the run() function inside the test. So when os-autoinst delegate the execution with the test this can;t control it anymore, except when the test goes out in a waitforneedle.
This lost of controls is IMO the problem, and the solutions are basically a variant of two:
1) Cooperative: Intercept every API that delegate again the control of the test to os-autoinst (sendkey[w], waitforneedle, check_screen, take_screenshot...). Is like a yield in a cooperative multithread env.
2) Preemptive: os-autoins forks the test loop and takes control from outside in a different loop. Basically it can kill, remove and restart the process that contains the tests loop from outside
Any ideas?