Add test for verifying overlay store.

This commit is contained in:
Ben Radford 2023-07-18 12:30:33 +01:00
parent a33ee5c843
commit 0ccf6382af
No known key found for this signature in database
GPG Key ID: 9DF5D4640AB888D5
3 changed files with 39 additions and 1 deletions

View File

@ -3,6 +3,7 @@ overlay-local-store-tests := \
$(d)/redundant-add.sh \
$(d)/build.sh \
$(d)/bad-uris.sh \
$(d)/add-lower.sh
$(d)/add-lower.sh \
$(d)/verify.sh
install-tests-groups += overlay-local-store

View File

@ -0,0 +1,32 @@
#!/usr/bin/env bash
set -eu -o pipefail
set -x
source common.sh
# Avoid store dir being inside sandbox build-dir
unset NIX_STORE_DIR
unset NIX_STATE_DIR
storeDirs
initLowerStore
mountOverlayfs
#path=$(nix-store --store "$storeB" --add ../dummy)
path=$(nix-build --store $storeB ../hermetic.nix --arg busybox "$busybox" --arg seed 1)
inputDrvPath=$(find "$storeA" -name "*-hermetic-input-1.drv")
rm -v "$inputDrvPath"
#tree "$TEST_ROOT"
#rm -v "$TEST_ROOT/store-a/$path"
nix-store --store "$storeB" --verify
echo "SUCCESS"

View File

@ -0,0 +1,5 @@
source common.sh
requireEnvironment
setupConfig
execUnshare ./verify-inner.sh