mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2025-02-16 23:27:17 +02:00
Add test for verifying overlay store.
This commit is contained in:
parent
a33ee5c843
commit
0ccf6382af
3 changed files with 39 additions and 1 deletions
|
@ -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
|
||||
|
|
32
tests/overlay-local-store/verify-inner.sh
Executable file
32
tests/overlay-local-store/verify-inner.sh
Executable 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"
|
5
tests/overlay-local-store/verify.sh
Executable file
5
tests/overlay-local-store/verify.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
source common.sh
|
||||
|
||||
requireEnvironment
|
||||
setupConfig
|
||||
execUnshare ./verify-inner.sh
|
Loading…
Add table
Reference in a new issue