mirror of
https://github.com/NixOS/nix.git
synced 2024-11-25 08:12:29 +00:00
tests/functional/common/init.sh: Make $TEST_ROOT writable before removing it
$TEST_ROOT typically contains read-only files/directories (e.g. the Nix store). So we have to make it writable first.
This commit is contained in:
parent
d352c52111
commit
1da18e85ba
@ -2,7 +2,10 @@ test -n "$TEST_ROOT"
|
|||||||
# We would delete any daemon socket, so let's stop the daemon first.
|
# We would delete any daemon socket, so let's stop the daemon first.
|
||||||
killDaemon
|
killDaemon
|
||||||
# Destroy the test directory that may have persisted from previous runs
|
# Destroy the test directory that may have persisted from previous runs
|
||||||
rm -rf "$TEST_ROOT"
|
if [[ -e "$TEST_ROOT" ]]; then
|
||||||
|
chmod -R u+w "$TEST_ROOT"
|
||||||
|
rm -rf "$TEST_ROOT"
|
||||||
|
fi
|
||||||
mkdir -p "$TEST_ROOT"
|
mkdir -p "$TEST_ROOT"
|
||||||
mkdir "$TEST_HOME"
|
mkdir "$TEST_HOME"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user