aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2021-03-16 13:43:08 +0100
committerregnat <rg@regnat.ovh>2021-03-16 14:21:39 +0100
commita0866c8ea4bc66f9aacc7ad19139d57946b3df18 (patch)
treee3e7f8bc27a6e395ceccae84c1bd5948a21c5df9 /tests
parenteab9cdbd75e739be33f9433cfba9ab354d084440 (diff)
Make the tests (optionnally) run in another derivation
That way we can run them without rebuilding Nix
Diffstat (limited to 'tests')
-rw-r--r--tests/common.sh.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/common.sh.in b/tests/common.sh.in
index 277dd6dfa..d31d3fbb8 100644
--- a/tests/common.sh.in
+++ b/tests/common.sh.in
@@ -29,6 +29,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@