diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-10-19 15:17:39 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-10-19 15:19:38 +0200 |
commit | af3db853fa273b44ccffbbd62357a0451ecb6725 (patch) | |
tree | 61a4c7456fc95d1987520890a420bab307e94213 | |
parent | 29727ff944be7e00c31ad95d0958e6fabc7d12a4 (diff) |
Handle $TMPDIR ending with a slash
This caused the gc test to fail on Darwin.
-rw-r--r-- | tests/common.sh.in | 2 | ||||
-rw-r--r-- | tests/simple.sh | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/common.sh.in b/tests/common.sh.in index 316d5f689..4565a490a 100644 --- a/tests/common.sh.in +++ b/tests/common.sh.in @@ -2,7 +2,7 @@ set -e datadir="@datadir@" -export TEST_ROOT=${TMPDIR:-/tmp}/nix-test +export TEST_ROOT=$(realpath ${TMPDIR:-/tmp}/nix-test) export NIX_STORE_DIR if ! NIX_STORE_DIR=$(readlink -f $TEST_ROOT/store 2> /dev/null); then # Maybe the build directory is symlinked. diff --git a/tests/simple.sh b/tests/simple.sh index 8f9d782a6..37631b648 100644 --- a/tests/simple.sh +++ b/tests/simple.sh @@ -18,7 +18,7 @@ if test "$text" != "Hello World!"; then exit 1; fi nix-store --delete $outPath if test -e $outPath/hello; then false; fi -outPath="$(NIX_REMOTE=local?store=/foo\&real=$TMPDIR/real-store nix-instantiate --readonly-mode hash-check.nix)" +outPath="$(NIX_REMOTE=local?store=/foo\&real=$TEST_ROOT/real-store nix-instantiate --readonly-mode hash-check.nix)" if test "$outPath" != "/foo/lfy1s6ca46rm5r6w4gg9hc0axiakjcnm-dependencies.drv"; then echo "hashDerivationModulo appears broken, got $outPath" exit 1 |