mirror of
https://github.com/NixOS/nix.git
synced 2025-12-12 03:51:04 +01:00
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>
This commit is contained in:
parent
5390bba920
commit
1b69645641
12 changed files with 261 additions and 15 deletions
|
|
@ -0,0 +1,18 @@
|
|||
#!/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!"
|
||||
Loading…
Add table
Add a link
Reference in a new issue