mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 07:16:17 +02:00
9bd1191fcc
Make sure that `extraSandboxProfile` is set before we check whether it's empty or not (in the `sandbox=true` case). Also adds a test case for this. Co-Authored-By: Artemis Tosini <lix@artem.ist> Co-Authored-By: Eelco Dolstra <edolstra@gmail.com>
23 lines
494 B
Bash
23 lines
494 B
Bash
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"
|