fixes
This commit is contained in:
parent
90f97b9da2
commit
0b5f6e4b25
1 changed files with 8 additions and 3 deletions
|
|
@ -9,8 +9,9 @@ import threading
|
||||||
import argparse
|
import argparse
|
||||||
import queue
|
import queue
|
||||||
import datetime
|
import datetime
|
||||||
|
import traceback
|
||||||
|
|
||||||
EMULATORS = [f"root34-{i}" for i in range(16)]
|
EMULATORS = [f"root34-{i}" for i in range(20)]
|
||||||
ANDROID_IMG = "system-images;android-34;default;x86_64"
|
ANDROID_IMG = "system-images;android-34;default;x86_64"
|
||||||
TIMEOUT = 400
|
TIMEOUT = 400
|
||||||
|
|
||||||
|
|
@ -267,7 +268,8 @@ def worker(emu: str, apklist: queue.Queue[str], out_folder: Path, script: Path):
|
||||||
apklist.task_done()
|
apklist.task_done()
|
||||||
marked_done = True
|
marked_done = True
|
||||||
continue
|
continue
|
||||||
|
if folder.exists():
|
||||||
|
shutil.rmtree(str(folder))
|
||||||
folder.mkdir(parents=True)
|
folder.mkdir(parents=True)
|
||||||
|
|
||||||
with (
|
with (
|
||||||
|
|
@ -346,10 +348,13 @@ def worker(emu: str, apklist: queue.Queue[str], out_folder: Path, script: Path):
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
msg = f"[{datetime.datetime.now()}] worker for {emu} (emulator-{console_port}) terminated after {e}"
|
msg = f"[{datetime.datetime.now()}] worker for {emu} (emulator-{console_port}) terminated after {e}"
|
||||||
print(msg)
|
print(msg)
|
||||||
with (out_folder / "worker_{emu}").open("w") as fp:
|
with (out_folder / f"worker_{emu}").open("w") as fp:
|
||||||
fp.write(msg)
|
fp.write(msg)
|
||||||
|
fp.write("\n")
|
||||||
|
fp.write("\n".join(traceback.format_exception(e)))
|
||||||
if not marked_done:
|
if not marked_done:
|
||||||
apklist.task_done()
|
apklist.task_done()
|
||||||
|
raise e
|
||||||
|
|
||||||
|
|
||||||
def run(apklist: list[str], out_folder: Path, script: Path):
|
def run(apklist: list[str], out_folder: Path, script: Path):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue