1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-24 13:51:16 +02:00
nix/tests/functional/build-remote-trustless.sh
Jörg Thalheim da7f7ba810 functional-tests: skip tests if the kernel restricts unprivileged user namespaces
Update tests/functional/common/functions.sh

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-12-15 16:07:27 +01:00

21 lines
710 B
Bash

# shellcheck shell=bash
# All variables should be defined externally by the scripts that source
# this, `set -u` will catch any that are forgotten.
# shellcheck disable=SC2154
requireSandboxSupport
requiresUnprivilegedUserNamespaces
[[ "$busybox" =~ busybox ]] || skipTest "no busybox"
unset NIX_STORE_DIR
unset NIX_STATE_DIR
remoteDir=$TEST_ROOT/remote
# Note: ssh{-ng}://localhost bypasses ssh. See tests/functional/build-remote.sh for
# more details.
nix-build "$file" -o "$TEST_ROOT/result" --max-jobs 0 \
--arg busybox "$busybox" \
--store "$TEST_ROOT/local" \
--builders "$proto://localhost?remote-program=$prog&remote-store=${remoteDir}%3Fsystem-features=foo%20bar%20baz - - 1 1 foo,bar,baz"