diff options
author | regnat <rg@regnat.ovh> | 2021-04-23 09:34:16 +0200 |
---|---|---|
committer | regnat <rg@regnat.ovh> | 2021-04-23 09:34:16 +0200 |
commit | 6ea9c65aece0b65825c99738340ea4944d083234 (patch) | |
tree | 873b171f6d3c23d236bc567dfad9a04c27f1efd5 | |
parent | 9161e02039e63327830128a3e69034b3cd46c109 (diff) |
fixup! Add a regression test for #4725
-rw-r--r-- | tests/ca/substitute.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/ca/substitute.sh b/tests/ca/substitute.sh index 5d0fc6a87..737c851a5 100644 --- a/tests/ca/substitute.sh +++ b/tests/ca/substitute.sh @@ -36,7 +36,12 @@ nix build --file ../simple.nix -L --no-link --post-build-hook ../push-to-store.s clearStore rm -r "$REMOTE_STORE_DIR/realisations" nix build --file ../simple.nix -L --no-link --substitute --substituters "$REMOTE_STORE" --no-require-sigs -j0 -if [[ $(sqlite3 "$NIX_STATE_DIR/db/db.sqlite" 'select count(*) from Realisations') -eq 0 ]]; then +# There's no easy way to check whether a realisation is present on the local +# store − short of manually querying the db, but the build environment doesn't +# have the sqlite binary − so we instead push things again, and check that the +# realisations have correctly been pushed to the remote store +nix copy --to "$REMOTE_STORE" --file ../simple.nix +if [[ -z "$(ls "$REMOTE_STORE_DIR/realisations")" ]]; then echo "Realisations not rebuilt" exit 1 fi |