diff --git a/tests/common.sh.in b/tests/common.sh.in index e8233bf72..09f0c1c32 100644 --- a/tests/common.sh.in +++ b/tests/common.sh.in @@ -55,7 +55,6 @@ clearStore() { mkdir "$NIX_STORE_DIR" rm -rf "$NIX_STATE_DIR" mkdir "$NIX_STATE_DIR" - nix-store --init clearProfiles } @@ -71,7 +70,7 @@ startDaemon() { # 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 - nix-daemon & + ${NIX_DAEMON_COMMAND:-nix-daemon} & for ((i = 0; i < 30; i++)); do if [ -e $NIX_DAEMON_SOCKET_PATH ]; then break; fi sleep 1 diff --git a/tests/remote-store.sh b/tests/remote-store.sh index 4cc73465a..78353c959 100644 --- a/tests/remote-store.sh +++ b/tests/remote-store.sh @@ -6,12 +6,12 @@ startDaemon storeCleared=1 NIX_REMOTE_=$NIX_REMOTE $SHELL ./user-envs.sh +nix-store --gc --max-freed 1K + nix-store --dump-db > $TEST_ROOT/d1 NIX_REMOTE= nix-store --dump-db > $TEST_ROOT/d2 cmp $TEST_ROOT/d1 $TEST_ROOT/d2 -nix-store --gc --max-freed 1K - killDaemon user=$(whoami)