mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 05:56:15 +02: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 changed files with 4 additions and 6 deletions
|
@ -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 a new issue