mirror of
https://github.com/NixOS/nix.git
synced 2024-11-25 00:02:25 +00:00
tests: always clean the test directory
previously the test directory could have been left untouched before executing a test when `init.sh` was not run - and sometimes it isn't supposed to be run - which made the test suite highly stateful and thus behaving surprisingly on multiple runs.
This commit is contained in:
parent
33ca905cdb
commit
7822ecbadf
@ -1,10 +1,8 @@
|
||||
test -n "$TEST_ROOT"
|
||||
if test -d "$TEST_ROOT"; then
|
||||
chmod -R u+rw "$TEST_ROOT"
|
||||
# We would delete any daemon socket, so let's stop the daemon first.
|
||||
killDaemon
|
||||
rm -rf "$TEST_ROOT"
|
||||
fi
|
||||
# We would delete any daemon socket, so let's stop the daemon first.
|
||||
killDaemon
|
||||
# Destroy the test directory that may have persisted from previous runs
|
||||
rm -rf "$TEST_ROOT"
|
||||
mkdir -p "$TEST_ROOT"
|
||||
mkdir "$TEST_HOME"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user