summaryrefslogtreecommitdiff
path: root/test-env.in
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-07-05 19:07:38 +0200
committerLudovic Courtès <ludo@gnu.org>2014-07-05 19:15:08 +0200
commit8ad49499b98b53ac105acd6fe58225b37e60e40b (patch)
tree93fd4bf4a177cf0dc660ccb3a41f1fde4f5b2e10 /test-env.in
parent8731e527496ee6834cfbfb786186d49ff0c0cfab (diff)
downloadguix-patches-8ad49499b98b53ac105acd6fe58225b37e60e40b.tar
guix-patches-8ad49499b98b53ac105acd6fe58225b37e60e40b.tar.gz
build: Support running the test suite from a directory with symlinks.
Fixes <http://bugs.gnu.org/17935>. Reported by Alex Kost <alezost@gmail.com>. * test-env.in: Canonicalize $NIX_STORE_DIR, and remove $NIX_IGNORE_SYMLINK_STORE setting. * tests/guix-register.sh: Likewise, canonicalize $new_store_dir and $new_store and leave $NIX_IGNORE_SYMLINK_STORE unchanged.
Diffstat (limited to 'test-env.in')
-rw-r--r--test-env.in12
1 files changed, 8 insertions, 4 deletions
diff --git a/test-env.in b/test-env.in
index a3b3536145..9d0c8cc414 100644
--- a/test-env.in
+++ b/test-env.in
@@ -27,8 +27,15 @@
if [ -x "@abs_top_builddir@/guix-daemon" ]
then
NIX_SETUID_HELPER="@abs_top_builddir@/nix-setuid-helper" # normally unused
- NIX_IGNORE_SYMLINK_STORE=1 # in case the store is a symlink
NIX_STORE_DIR="@GUIX_TEST_ROOT@/store"
+
+ # Do that because store.scm calls `canonicalize-path' on it.
+ mkdir -p "$NIX_STORE_DIR"
+
+ # Canonicalize the store directory name in an attempt to avoid symlinks in
+ # it or its parent directories. See <http://bugs.gnu.org/17935>.
+ NIX_STORE_DIR="`cd "@GUIX_TEST_ROOT@/store"; pwd -P`"
+
NIX_LOCALSTATE_DIR="@GUIX_TEST_ROOT@/var"
NIX_LOG_DIR="@GUIX_TEST_ROOT@/var/log/guix"
NIX_DB_DIR="@GUIX_TEST_ROOT@/db"
@@ -71,9 +78,6 @@ then
GUIX_ALLOW_UNAUTHENTICATED_SUBSTITUTES \
NIX_CONF_DIR XDG_CACHE_HOME
- # Do that because store.scm calls `canonicalize-path' on it.
- mkdir -p "$NIX_STORE_DIR"
-
# Launch the daemon without chroot support because is may be
# unavailable, for instance if we're not running as root.
"@abs_top_builddir@/pre-inst-env" \