aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2021-07-27 11:12:32 +0200
committerregnat <rg@regnat.ovh>2021-07-27 17:06:11 +0200
commitc2c0dba792effa4de6ad16950684c1ce80ab6730 (patch)
tree237fa2e1cc2017eac8cd7723eb2bfc8f974119d2
parentaddacfce4a71f33b50b6af321d6a8d67ca44ceed (diff)
Remove the right socket before starting the daemon
For some reason, an old socket occasionally stays here on OSX, causing the subsequent tests to fail
-rw-r--r--tests/common.sh.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/common.sh.in b/tests/common.sh.in
index bc2e0931f..7daab2460 100644
--- a/tests/common.sh.in
+++ b/tests/common.sh.in
@@ -88,10 +88,10 @@ startDaemon() {
fi
# Start the daemon, wait for the socket to appear. !!!
# ‘nix-daemon’ should have an option to fork into the background.
- rm -f $NIX_STATE_DIR/daemon-socket/socket
+ rm -f $NIX_DAEMON_SOCKET_PATH
${NIX_DAEMON_COMMAND:-nix daemon} &
for ((i = 0; i < 30; i++)); do
- if [ -e $NIX_DAEMON_SOCKET_PATH ]; then break; fi
+ if [[ -S $NIX_DAEMON_SOCKET_PATH ]]; then break; fi
sleep 1
done
pidDaemon=$!