|
@@ -116,15 +116,21 @@ class Emulator(object):
|
|
|
ldavg_str = f"{ldavg[0]:.2f}, {ldavg[1]:.2f}, {ldavg[2]:.2f}"
|
|
|
self.logfile.write(f"> host loadavg: {ldavg_str}\n")
|
|
|
self.logfile.write(f"> timeout multiplier: {self.timeout_multiplier}\n")
|
|
|
- self.logfile.write("> starting qemu with '%s'\n" % " ".join(qemu_cmd))
|
|
|
+ self.logfile.write(f"> emulator using {qemu_cmd[0]} version:\n")
|
|
|
host_bin = os.path.join(self.builddir, "host", "bin")
|
|
|
br_path = host_bin + os.pathsep + os.environ["PATH"]
|
|
|
+ qemu_env = {"QEMU_AUDIO_DRV": "none",
|
|
|
+ "PATH": br_path}
|
|
|
+ pexpect.run(f"{qemu_cmd[0]} --version",
|
|
|
+ encoding='utf-8',
|
|
|
+ logfile=self.logfile,
|
|
|
+ env=qemu_env)
|
|
|
+ self.logfile.write("> starting qemu with '%s'\n" % " ".join(qemu_cmd))
|
|
|
self.qemu = pexpect.spawn(qemu_cmd[0], qemu_cmd[1:],
|
|
|
timeout=5 * self.timeout_multiplier,
|
|
|
encoding='utf-8',
|
|
|
codec_errors='replace',
|
|
|
- env={"QEMU_AUDIO_DRV": "none",
|
|
|
- "PATH": br_path})
|
|
|
+ env=qemu_env)
|
|
|
# We want only stdout into the log to avoid double echo
|
|
|
self.qemu.logfile_read = self.logfile
|
|
|
|