test -n "$TEST_ROOT" # 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 if [[ -e "$TEST_ROOT" ]]; then chmod -R u+w "$TEST_ROOT" rm -rf "$TEST_ROOT" fi mkdir -p "$TEST_ROOT" mkdir "$TEST_HOME" mkdir "$NIX_STORE_DIR" mkdir "$NIX_LOCALSTATE_DIR" mkdir -p "$NIX_LOG_DIR"/drvs mkdir "$NIX_STATE_DIR" mkdir "$NIX_CONF_DIR" cat > "$NIX_CONF_DIR"/nix.conf < "$NIX_CONF_DIR"/nix.conf.extra <