diff options
Diffstat (limited to 'tests/init.sh')
-rwxr-xr-x[-rw-r--r--] | tests/init.sh | 6 |
1 files changed, 6 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" |