2024-05-28 19:43:04 +03:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2023-07-13 20:17:17 +03:00
|
|
|
source common.sh
|
2023-10-05 19:12:18 +03:00
|
|
|
# This test is run by `tests/functional/nested-sandboxing/runner.nix` in an extra layer of sandboxing.
|
2023-07-13 20:17:17 +03:00
|
|
|
[[ -d /nix/store ]] || skipTest "running this test without Nix's deps being drawn from /nix/store is not yet supported"
|
|
|
|
|
2024-06-16 13:51:46 +03:00
|
|
|
TODO_NixOS
|
|
|
|
|
2023-07-13 20:17:17 +03:00
|
|
|
requireSandboxSupport
|
|
|
|
|
2024-11-01 15:56:50 +02:00
|
|
|
start="$TEST_ROOT/start"
|
|
|
|
mkdir -p "$start"
|
|
|
|
cp -r common common.sh ${config_nix} ./nested-sandboxing "$start"
|
|
|
|
cp "${_NIX_TEST_BUILD_DIR}/common/subst-vars.sh" "$start/common"
|
|
|
|
# N.B. redefine
|
|
|
|
_NIX_TEST_SOURCE_DIR="$start"
|
|
|
|
_NIX_TEST_BUILD_DIR="$start"
|
|
|
|
cd "$start"
|
|
|
|
|
2023-07-13 20:17:17 +03:00
|
|
|
source ./nested-sandboxing/command.sh
|
|
|
|
|
|
|
|
expectStderr 100 runNixBuild badStoreUrl 2 | grepQuiet '`sandbox-build-dir` must not contain'
|
|
|
|
|
|
|
|
runNixBuild goodStoreUrl 5
|