aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2021-06-24 11:41:51 +0200
committerregnat <rg@regnat.ovh>2021-06-24 11:41:57 +0200
commitbe7a4a6a1303ddbd1f8942f02c04f69016c51da0 (patch)
tree8d895d96adb6b6f62dfa43ed7ca098c6928aaede /tests
parent01a3f4d7ec79d434dc34b64a761ddf681fe63a48 (diff)
Make the post-build-hook also run for unresolved CA derivations
Fix #4837
Diffstat (limited to 'tests')
-rwxr-xr-xtests/ca/post-hook.sh11
-rw-r--r--tests/local.mk1
-rw-r--r--tests/post-hook.sh2
3 files changed, 13 insertions, 1 deletions
diff --git a/tests/ca/post-hook.sh b/tests/ca/post-hook.sh
new file mode 100755
index 000000000..4b8da4cd8
--- /dev/null
+++ b/tests/ca/post-hook.sh
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+
+source common.sh
+
+sed -i 's/experimental-features .*/& ca-derivations ca-references nix-command flakes/' "$NIX_CONF_DIR"/nix.conf
+
+export NIX_TESTS_CA_BY_DEFAULT=1
+cd ..
+source ./post-hook.sh
+
+
diff --git a/tests/local.mk b/tests/local.mk
index 82cec1df3..35ee9e271 100644
--- a/tests/local.mk
+++ b/tests/local.mk
@@ -39,6 +39,7 @@ nix_tests = \
search.sh \
nix-copy-ssh.sh \
post-hook.sh \
+ ca/post-hook.sh \
function-trace.sh \
recursive.sh \
describe-stores.sh \
diff --git a/tests/post-hook.sh b/tests/post-hook.sh
index aa3e6a574..238a8f826 100644
--- a/tests/post-hook.sh
+++ b/tests/post-hook.sh
@@ -4,7 +4,7 @@ clearStore
rm -f $TEST_ROOT/result
-export REMOTE_STORE=$TEST_ROOT/remote_store
+export REMOTE_STORE=file:$TEST_ROOT/remote_store
# Build the dependencies and push them to the remote store
nix-build -o $TEST_ROOT/result dependencies.nix --post-build-hook $PWD/push-to-store.sh