aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--]tests/init.sh6
-rw-r--r--tests/local.mk1
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/init.sh b/tests/init.sh
index 3c6d5917d..da0568ed9 100644..100755
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -1,8 +1,14 @@
+set -e -o pipefail
+
source common.sh
test -n "$TEST_ROOT"
if test -d "$TEST_ROOT"; then
chmod -R u+w "$TEST_ROOT"
+ # We would delete any daemon socket, so let's stop the daemon first.
+ if [[ -n "${NIX_DAEMON_PACKAGE:-}" ]]; then
+ killDaemon
+ fi
rm -rf "$TEST_ROOT"
fi
mkdir "$TEST_ROOT"
diff --git a/tests/local.mk b/tests/local.mk
index b3135fd4d..4ef071f96 100644
--- a/tests/local.mk
+++ b/tests/local.mk
@@ -1,4 +1,5 @@
nix_tests = \
+ init.sh \
flakes/flakes.sh \
flakes/run.sh \
flakes/mercurial.sh \