From 3b81b2645706d7f8d9c0ec228426dee8ef1fc7ac Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 24 Mar 2016 14:38:31 +0100 Subject: [PATCH] Use shorter daemon socket path in tests Otherwise we hit the 104 character limit. http://hydra.nixos.org/build/33562028 --- tests/common.sh.in | 2 +- tests/filter-source.nix | 2 +- tests/tarball.sh | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/common.sh.in b/tests/common.sh.in index eb9798a2..50d2c77b 100644 --- a/tests/common.sh.in +++ b/tests/common.sh.in @@ -2,7 +2,7 @@ set -e datadir="@datadir@" -export TEST_ROOT=$(pwd)/test-tmp +export TEST_ROOT=${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/filter-source.nix b/tests/filter-source.nix index a620f0fd..90716363 100644 --- a/tests/filter-source.nix +++ b/tests/filter-source.nix @@ -8,5 +8,5 @@ mkDerivation { type != "symlink" && baseNameOf path != "foo" && !((import ./lang/lib.nix).hasSuffix ".bak" (baseNameOf path)); - in builtins.filterSource filter ./test-tmp/filterin; + in builtins.filterSource filter ((builtins.getEnv "TEST_ROOT") + "/filterin"); } diff --git a/tests/tarball.sh b/tests/tarball.sh index cb5258a9..ae18490c 100644 --- a/tests/tarball.sh +++ b/tests/tarball.sh @@ -16,8 +16,8 @@ tarball=$TEST_ROOT/tarball.tar.xz nix-env -f file://$tarball -qa --out-path | grep -q dependencies -nix-build file://$tarball +nix-build -o $TMPDIR/result file://$tarball -nix-build '' -I foo=file://$tarball +nix-build -o $TMPDIR/result '' -I foo=file://$tarball -nix-build -E "import (fetchTarball file://$tarball)" +nix-build -o $TMPDIR/result -E "import (fetchTarball file://$tarball)"