[Buildroot] [PATCH v2 7/8] testing: test can use the locally generated qemu host tool
Arnout Vandecappelle
arnout at mind.be
Tue Mar 19 22:03:30 UTC 2019
On 19/03/2019 08:05, Etienne Carriere wrote:
> I made this to allow test_optee to use the qemu config from the platform.
> But I wonder if it would be more suitable to have an generic option to
> script run-tests to build the emulator within the test config.
That would indeed be a better idea IMO.
> - qemu_cmd = ["qemu-system-{}".format(qemu_arch),
> + if local:
> + basedir = os.path.join(self.builddir, "host/bin/")
> + else:
> + basedir = ""
> +
> + qemu_cmd = [basedir + "qemu-system-{}".format(qemu_arch),
> "-serial", "stdio",
> "-display", "none"]
Instead of constructing it like this, I think it would be simpler to always add
output/host/bin to PATH. Unfortunately, however, pexpect only respects the PATH
setting of the env argument since version 4.2.0 [1], and we can't rely on the
system-installed pexpect to have that version. So you have to mess about with
os.environ (which you'd want to restore to the original after running qemu).
Regards,
Arnout
[1] https://github.com/pexpect/pexpect/pull/348
More information about the buildroot
mailing list