Fixed test_webui only failing in nix_sandbox also fixed test_create_flake

This commit is contained in:
Qubasa
2023-10-29 19:51:35 +01:00
parent 4209da96e9
commit 7a8eef0648
4 changed files with 11 additions and 45 deletions

View File

@@ -21,14 +21,11 @@ def command_exec(cmd: List[str], work_dir: Path, env: Dict[str, str]) -> None:
def block_for_input() -> None:
log = logging.getLogger(__name__)
procid = os.getpid()
command = f"echo 'continue' > /sys/proc/{procid}/fd/{sys.stdin.fileno()}"
f"echo 'continue' > /sys/proc/{procid}/fd/{sys.stdin.fileno()}"
while True:
log.warning("Use sudo cntr attach <pid> to attach to the container.")
log.warning("Resume execution by executing '%s' in cntr shell", command)
res = input("Input 'continue' to resume execution: ")
if res == "continue":
break
# log.warning("Resume execution by executing '%s' in cntr shell", command)
time.sleep(1)
log.info("Resuming execution.")