clan-cli: deprecate nix_shell() in favor of run_cmd()

This commit is contained in:
DavHau
2024-07-16 13:48:55 +07:00
parent c9de01b9d0
commit 37e6ca7a30
24 changed files with 104 additions and 116 deletions

View File

@@ -40,6 +40,7 @@ def run_vm_in_thread(machine_name: str) -> None:
# wait for qmp socket to exist
def wait_vm_up(state_dir: Path) -> None:
socket_file = state_dir / "qga.sock"
# don't lower this value -> trouble if test machine is slow
timeout: float = 100
while True:
if timeout <= 0:
@@ -55,7 +56,8 @@ def wait_vm_up(state_dir: Path) -> None:
# wait for vm to be down by checking if qga socket is down
def wait_vm_down(state_dir: Path) -> None:
socket_file = state_dir / "qga.sock"
timeout: float = 300
# don't lower this value -> trouble if test machine is slow
timeout: float = 100
while socket_file.exists():
if timeout <= 0:
raise TimeoutError(