1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-10 02:51:02 +01:00
nix/tests/functional/build-remote-resource-management-should-fail.sh
Lisanna 1b69645641 Implement resource-management experimental feature
Adds basic resource tracking to system features used by distributed
builds, similar to resource management in job schedulers like Slurm.

Includes a positive and negative functional test and a documentation
update to the distributed builds section.

Resolves #2307

Signed-off-by: Lisanna Dettwyler <lisanna.dettwyler@gmail.com>
2025-11-04 12:56:44 -05:00

18 lines
573 B
Bash

#!/usr/bin/env bash
source common.sh
enableFeatures "resource-management"
requireSandboxSupport
[[ $busybox =~ busybox ]] || skipTest "no busybox"
here=$(readlink -f "$(dirname "${BASH_SOURCE[0]}")")
export NIX_USER_CONF_FILES=$here/config/nix-with-resource-management.conf
expectStderr 1 nix build -Lvf resource-management.nix \
--arg busybox "$busybox" \
--out-link "$TEST_ROOT/result-from-remote" \
--store "$TEST_ROOT/local" \
--builders "ssh-ng://localhost?system-features=testf - - 4 1 testf:1" \
| grepQuiet "Failed to find a machine for remote build!"