1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-02-27 06:42:02 +00:00

fix(tests): don't wipe logs on emulator restart

[no changelog]
This commit is contained in:
Martin Milata 2025-02-26 22:59:34 +01:00
parent 8058f9f60c
commit 0491efed02

View File

@ -139,6 +139,7 @@ class EmulatorWrapper:
if logs_dir is not None: if logs_dir is not None:
src = Path(self.profile_dir.name) / "trezor.log" src = Path(self.profile_dir.name) / "trezor.log"
dst = Path(logs_dir) / f"trezor-{self.worker_id}.log" dst = Path(logs_dir) / f"trezor-{self.worker_id}.log"
shutil.move(src, dst) with open(src, "rb") as src, open(dst, "ab") as dst:
shutil.copyfileobj(src, dst)
self.profile_dir.cleanup() self.profile_dir.cleanup()