I want to run tests inside qemu, but that means it has to terminate
somehow. This script prepares the ground for this. It runs qemu from
within a Python script as a subprocess, taking complete control over
stdin and stdout, and process lifetime.
The test stdout+stderr will be captured in a file, which can then be
compared against expected output. The test running time can be capped by
a timeout.
As a side effect, intercepting stdin also allows the script to listen to
signals like Ctrl-c, which finally allows a convenient qemu termination
in dev environment.
I want to run tests inside qemu, but that means it has to terminate somehow. This script prepares the ground for this. It runs qemu from within a Python script as a subprocess, taking complete control over stdin and stdout, and process lifetime.
The test stdout+stderr will be captured in a file, which can then be compared against expected output. The test running time can be capped by a timeout.
As a side effect, intercepting stdin also allows the script to listen to signals like Ctrl-c, which finally allows a convenient qemu termination in dev environment.