mirror of
https://github.com/NixOS/nix
synced 2025-07-07 14:21:48 +02:00
nix-store --serve: pass on settings.keepFailed
from SSH store
When doing e.g. nix-build -A package --keep-failed --option \ builders \ 'ssh://mfhydra?remote-store=/home/bosch/store x86_64-linux - 10 4 big-parallel' this doesn't work properly because this build-setting is ignored. I changed this behavior by passing the `settings.keepFailed` through the serve-protocol to remote machines to make sure that I can introspect the build-directory (which is particularly helpful when I have to look at a `config.log` from a failed build for instance).
This commit is contained in:
parent
af94b54db3
commit
50edbc4ddf
5 changed files with 43 additions and 1 deletions
|
@ -53,3 +53,16 @@ nix path-info --store $TEST_ROOT/machine3 --all \
|
|||
| grep -v builder-build-remote-input-1.sh \
|
||||
| grep -v builder-build-remote-input-2.sh \
|
||||
| grep builder-build-remote-input-3.sh
|
||||
|
||||
# Behavior of keep-failed
|
||||
out="$(nix-build 2>&1 failing.nix \
|
||||
--builders "$(join_by '; ' "${builders[@]}")" \
|
||||
--keep-failed \
|
||||
--store $TEST_ROOT/machine0 \
|
||||
-j0 \
|
||||
--arg busybox $busybox)" || true
|
||||
|
||||
[[ "$out" =~ .*"note: keeping build directory".* ]]
|
||||
|
||||
build_dir="$(grep "note: keeping build" <<< "$out" | sed -E "s/^(.*)note: keeping build directory '(.*)'(.*)$/\2/")"
|
||||
[[ "foo" = $(<"$build_dir"/bar) ]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue