diff options
Diffstat (limited to 'tests/ca/substitute.sh')
-rw-r--r-- | tests/ca/substitute.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/ca/substitute.sh b/tests/ca/substitute.sh new file mode 100644 index 000000000..b44fe499a --- /dev/null +++ b/tests/ca/substitute.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +# Ensure that binary substitution works properly with ca derivations + +source common.sh + +sed -i 's/experimental-features .*/& ca-derivations ca-references/' "$NIX_CONF_DIR"/nix.conf + +rm -rf $TEST_ROOT/binary_cache + +export REMOTE_STORE=file://$TEST_ROOT/binary_cache + +buildDrvs () { + nix build --file ./content-addressed.nix -L --no-link "$@" +} + +# Populate the remote cache +clearStore +buildDrvs --post-build-hook ../push-to-store.sh + +# Restart the build on an empty store, ensuring that we don't build +clearStore +buildDrvs --substitute --substituters $REMOTE_STORE --no-require-sigs -j0 + |