about summary refs log tree commit diff
path: root/tests/common.sh.in
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-07-21T12·46+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-07-21T12·46+0000
commit7adaa6d4466063893c9ac6b5b7d71c423be34b69 (patch)
tree144e3b4f6e9c070d56e45c218e27c5a9e0cc8f57 /tests/common.sh.in
parentdcded7da4704ae66ebbb4343597868a7eb992aa7 (diff)
* Test for runtime root finding.
Diffstat (limited to 'tests/common.sh.in')
-rw-r--r--tests/common.sh.in10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/common.sh.in b/tests/common.sh.in
index f96f28d206..12162649e4 100644
--- a/tests/common.sh.in
+++ b/tests/common.sh.in
@@ -1,10 +1,12 @@
 set -e
 
-# Maybe the build directory is symlinked.
-export NIX_IGNORE_SYMLINK_STORE=1
-
 export TEST_ROOT=$(pwd)/test-tmp
-export NIX_STORE_DIR=$TEST_ROOT/store
+export NIX_STORE_DIR
+if ! NIX_STORE_DIR=$(readlink -f $TEST_ROOT/store); then
+    # Maybe the build directory is symlinked.
+    export NIX_IGNORE_SYMLINK_STORE=1
+    NIX_STORE_DIR=$TEST_ROOT/store
+fi
 export NIX_DATA_DIR=$TEST_ROOT/data
 export NIX_LOCALSTATE_DIR=$TEST_ROOT/var
 export NIX_LOG_DIR=$TEST_ROOT/var/log/nix