mirror of
https://github.com/NixOS/nix
synced 2025-07-07 18:31:49 +02:00
Test RemoteStore::buildDerivation
Fix `wopNarFromPath` which needed a `toRealPath`.
This commit is contained in:
parent
5d67f18c86
commit
d2f2be0f70
3 changed files with 30 additions and 7 deletions
|
@ -13,6 +13,7 @@ builders=(
|
|||
# remote-store URL.
|
||||
"ssh://localhost?remote-store=$TEST_ROOT/machine1?system-features=foo - - 1 1 foo"
|
||||
"$TEST_ROOT/machine2 - - 1 1 bar"
|
||||
"ssh-ng://localhost?remote-store=$TEST_ROOT/machine3?system-features=baz - - 1 1 baz"
|
||||
)
|
||||
|
||||
# Note: ssh://localhost bypasses ssh, directly invoking nix-store as a
|
||||
|
@ -25,12 +26,24 @@ nix build -L -v -f build-hook.nix -o $TEST_ROOT/result --max-jobs 0 \
|
|||
|
||||
outPath=$(readlink -f $TEST_ROOT/result)
|
||||
|
||||
grep 'FOO BAR' $TEST_ROOT/machine0/$outPath
|
||||
grep 'FOO BAR BAZ' $TEST_ROOT/machine0/$outPath
|
||||
|
||||
set -o pipefail
|
||||
|
||||
# Ensure that input1 was built on store1 due to the required feature.
|
||||
(! nix path-info --store $TEST_ROOT/machine2 --all | grep builder-build-remote-input-1.sh)
|
||||
nix path-info --store $TEST_ROOT/machine1 --all | grep builder-build-remote-input-1.sh
|
||||
nix path-info --store $TEST_ROOT/machine1 --all \
|
||||
| grep builder-build-remote-input-1.sh \
|
||||
| grep -v builder-build-remote-input-2.sh \
|
||||
| grep -v builder-build-remote-input-3.sh
|
||||
|
||||
# Ensure that input2 was built on store2 due to the required feature.
|
||||
(! nix path-info --store $TEST_ROOT/machine1 --all | grep builder-build-remote-input-2.sh)
|
||||
nix path-info --store $TEST_ROOT/machine2 --all | grep builder-build-remote-input-2.sh
|
||||
nix path-info --store $TEST_ROOT/machine2 --all \
|
||||
| grep -v builder-build-remote-input-1.sh \
|
||||
| grep builder-build-remote-input-2.sh \
|
||||
| grep -v builder-build-remote-input-3.sh
|
||||
|
||||
# Ensure that input3 was built on store3 due to the required feature.
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue