1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-19 10:50:24 -04:00
nix/tests/functional/local-overlay-store/build-inner.sh
John Ericson bf0bf3d1be local-overlay store tests: storeDirs -> setupStoreDirs
Co-Authored-By: Théophane Hufschmitt <theophane.hufschmitt@tweag.io>
2023-12-11 13:30:40 -05:00

31 lines
608 B
Bash
Executable file

#!/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
setupStoreDirs
initLowerStore
mountOverlayfs
### Do a build in overlay store
path=$(nix-build ../hermetic.nix --arg busybox $busybox --arg seed 2 --store "$storeB" --no-out-link)
# Checking for path in lower layer (should fail)
expect 1 stat $(toRealPath "$storeA/nix/store" "$path")
# Checking for path in upper layer
stat $(toRealPath "$storeBTop" "$path")
# Verifying path in overlay store
nix-store --verify-path --store "$storeB" "$path"