log output

This commit is contained in:
Jean-Marie Mineau 2025-05-14 16:03:58 +02:00
parent 29132f5a58
commit 3eb02591d4
Signed by: histausse
GPG key ID: B66AEEDA9B645AD2

View file

@ -115,6 +115,13 @@ def worker(emu: str, apklist: list[str], out_folder: Path, script: Path):
continue
folder.mkdir(parents=True)
with (
(folder / "emu.out").open("w") as fp_emu_stdout,
(folder / "emu.err").open("w") as fp_emu_stderr,
(folder / "analysis.out").open("w") as fp_anly_stdout,
(folder / "analysis.err").open("w") as fp_anly_stderr,
):
# Start emulator with wipped data
proc = subprocess.Popen(
[
@ -127,9 +134,15 @@ def worker(emu: str, apklist: list[str], out_folder: Path, script: Path):
"-debug-init", # dunno why but sometime needed
"-ports",
f"{console_port},{adb_port}",
]
],
stdout=fp_emu_stdout,
stderr=fp_emu_stderr,
)
subprocess.run(
[ADB, "-s", f"emulator-{console_port}", "wait-for-device"],
stdout=fp_anly_stdout,
stderr=fp_anly_stderr,
)
subprocess.run([ADB, "-s", f"emulator-{console_port}", "wait-for-device"])
# Run script
subprocess.run(