diff --git a/tests/overlay-local-store/common.sh b/tests/overlay-local-store/common.sh index 0e98e931f..2fba2e7f6 100644 --- a/tests/overlay-local-store/common.sh +++ b/tests/overlay-local-store/common.sh @@ -59,3 +59,12 @@ initLowerStore () { execUnshare () { exec unshare --mount --map-root-user "$SHELL" "$@" } + +addTextToStore() { + storeDir=$1; shift + filename=$1; shift + content=$1; shift + filePath="$TEST_HOME/$filename" + echo "$content" > "$filePath" + nix-store --store "$storeDir" --add "$filePath" +}