Skip to content

Commit

Permalink
Add a test for copying CA derivations outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
thufschmitt committed Nov 18, 2020
1 parent 9459f09 commit 910fe3e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/local.mk
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ nix_tests = \
describe-stores.sh \
flakes.sh \
content-addressed.sh \
build.sh
build.sh \
content-addressed.sh \
nix-copy-content-addressed.sh
# parallel.sh
# build-remote-content-addressed-fixed.sh \
Expand Down
24 changes: 24 additions & 0 deletions tests/nix-copy-content-addressed.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
source common.sh

clearStore
clearCache

commonArgs=( \
--experimental-features 'nix-command flakes ca-derivations ca-references' \
--file ./content-addressed.nix \
-v
)

remoteRoot=$TEST_ROOT/store2
chmod -R u+w "$remoteRoot" || true
rm -rf "$remoteRoot"

# Fill the remote cache
nix copy --to $remoteRoot --no-require-sigs "${commonArgs[@]}"
clearStore

# Fetch the otput from the cache
nix copy --from $remoteRoot --no-require-sigs "${commonArgs[@]}"

# Ensure that everything is locally present
nix build "${commonArgs[@]}" -j0 --no-link

0 comments on commit 910fe3e

Please sign in to comment.