aboutsummaryrefslogtreecommitdiff
path: root/tests/functional/extra-sandbox-profile.sh
diff options
context:
space:
mode:
authorArtemis Tosini <lix@artem.ist>2024-05-12 03:51:19 +0000
committerGerrit Code Review <gerrit@lix-systems>2024-05-12 03:51:19 +0000
commit4b35e6a75e35e0f79bdadfd5e0d44bc870dcc135 (patch)
tree3af80129d878261e7ebcc746c90c16c5df1b8ab9 /tests/functional/extra-sandbox-profile.sh
parenta30c5673367533aec48faa59dd0d76b283dda1ba (diff)
parentadea821d8766976f6e0006575aba39404b649e40 (diff)
Merge "libstore: Fix sandbox=relaxed" into main
Diffstat (limited to 'tests/functional/extra-sandbox-profile.sh')
-rw-r--r--tests/functional/extra-sandbox-profile.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/functional/extra-sandbox-profile.sh b/tests/functional/extra-sandbox-profile.sh
new file mode 100644
index 000000000..ac3ca036f
--- /dev/null
+++ b/tests/functional/extra-sandbox-profile.sh
@@ -0,0 +1,23 @@
+source common.sh
+
+if [[ $(uname) != Darwin ]]; then skipTest "Need Darwin"; fi
+
+DEST_FILE="${TEST_ROOT}/foo"
+
+testSandboxProfile () (
+ set -e
+
+ sandboxMode="$1"
+
+ rm -f "${DEST_FILE}"
+ nix-build --no-out-link ./extra-sandbox-profile.nix \
+ --option sandbox "$sandboxMode" \
+ --argstr seed "$RANDOM" \
+ --argstr destFile "${DEST_FILE}"
+
+ ls -l "${DEST_FILE}"
+)
+
+testSandboxProfile "false"
+expectStderr 2 testSandboxProfile "true"
+testSandboxProfile "relaxed"