File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4747 requiredSystemFeatures = [ "baz" ] ;
4848 } ;
4949
50+ input4 = mkDerivation {
51+ shell = busybox ;
52+ name = "build-remote-input-4" ;
53+ buildCommand = ''
54+ echo hi-input3
55+ read x < ${ input3 }
56+ echo $x BAZ > $out
57+ '' ;
58+ rejectSystemFeatures = [ "bar" ] ;
59+ requiredSystemFeatures = [ "foo" ] ;
60+ } ;
61+
5062in
5163
5264 mkDerivation {
5365 shell = busybox ;
5466 name = "build-remote" ;
55- passthru = { inherit input1 input2 input3 ; } ;
67+ passthru = { inherit input1 input2 input3 input4 ; } ;
5668 buildCommand =
5769 ''
5870 read x < ${ input1 }
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ builders=(
2323 " ssh://localhost?remote-store=$TEST_ROOT /machine1?system-features=$( join_by " %20" foo " ${EXTRA_SYSTEM_FEATURES[@]} " ) - - 1 1 $( join_by " ," foo " ${EXTRA_SYSTEM_FEATURES[@]} " ) "
2424 " $TEST_ROOT /machine2 - - 1 1 $( join_by " ," bar " ${EXTRA_SYSTEM_FEATURES[@]} " ) "
2525 " ssh-ng://localhost?remote-store=$TEST_ROOT /machine3?system-features=$( join_by " %20" baz " ${EXTRA_SYSTEM_FEATURES[@]} " ) - - 1 1 $( join_by " ," baz " ${EXTRA_SYSTEM_FEATURES[@]} " ) "
26+ " $TEST_ROOT /machine4 - - 1 1 $( join_by " ," bar foo " ${EXTRA_SYSTEM_FEATURES[@]} " ) "
2627)
2728
2829chmod -R +w " $TEST_ROOT /machine" * || true
@@ -70,6 +71,12 @@ echo "$output" | grepQuietInverse builder-build-remote-input-2.sh
7071echo " $output " | grepQuiet builder-build-remote-input-3.sh
7172unset output
7273
74+ # Ensure that input4 was built on store4 due to the required feature.
75+ output=$( nix path-info --store " $TEST_ROOT /machine4" --all)
76+ echo " $output " | grepQuietInverse builder-build-remote-input-1.sh
77+ echo " $output " | grepQuietInverse builder-build-remote-input-2.sh
78+ echo " $output " | grepQuietInverse builder-build-remote-input-3.sh
79+ unset output
7380
7481for i in input1 input3; do
7582nix log --store " $TEST_ROOT /machine0" --file " $file " --arg busybox " $busybox " " passthru.$i " | grep hi-$i
You can’t perform that action at this time.
0 commit comments