From 62a42ab43e2d79fd6f7cff7d3a4aca1a07caa175 Mon Sep 17 00:00:00 2001 From: regnat Date: Tue, 16 Mar 2021 13:43:08 +0100 Subject: [PATCH] Make the tests (optionnally) run in another derivation That way we can run them without rebuilding Nix (cherry picked from commit a0866c8ea4bc66f9aacc7ad19139d57946b3df18) --- tests/common.sh.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/common.sh.in b/tests/common.sh.in index 09f0c1c32..cdb84f4da 100644 --- a/tests/common.sh.in +++ b/tests/common.sh.in @@ -26,6 +26,12 @@ unset XDG_CACHE_HOME mkdir -p $TEST_HOME export PATH=@bindir@:$PATH +if [[ -n "${NIX_CLIENT_PACKAGE:-}" ]]; then + export PATH="$NIX_CLIENT_PACKAGE/bin":$PATH +fi +if [[ -n "${NIX_DAEMON_PACKAGE:-}" ]]; then + export NIX_DAEMON_COMMAND="$NIX_DAEMON_PACKAGE/bin/nix-daemon" +fi coreutils=@coreutils@ export dot=@dot@