From 73898cad0e1dd99f63b24a6bf7cd21b9501c6d81 Mon Sep 17 00:00:00 2001 From: Jade Lovelace Date: Mon, 10 Jun 2024 21:34:03 -0700 Subject: tests/flake-registry: Fix occasional deadlocks This seems to have been caused by having the wrong PID. I don't know why it worked before in the sandbox, but the code was definitely wrong before, so let's just fix it. Change-Id: I556580bdf614c716566310e975a36daa6d6c9a91 --- tests/functional/flakes/flake-registry.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/functional/flakes/flake-registry.sh b/tests/functional/flakes/flake-registry.sh index 73ab353bf..5e72bd05a 100644 --- a/tests/functional/flakes/flake-registry.sh +++ b/tests/functional/flakes/flake-registry.sh @@ -22,6 +22,7 @@ nix registry list | grep '^global flake:home-manager' set -m # port 0: auto pick a free port, unbufferred output python3 -u -m http.server 0 --bind 127.0.0.1 > server.out & + # wait for the http server to admit it is working while ! grep -qP 'port \d+' server.out ; do echo 'waiting for python http' >&2 @@ -69,4 +70,4 @@ nix registry list | grep '^global flake:private-flake' # make sure we have a warning: nix registry list 2>&1 | grep "config option flake-registry referring to a URL is deprecated and will be removed" -kill %1 +kill %python -- cgit v1.2.3