File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6969 requiredSystemFeatures = [ "baz" ] ;
7070 } ;
7171
72+ input4 = mkDerivation {
73+ shell = busybox ;
74+ name = "build-remote-input-4" ;
75+ buildCommand = ''
76+ echo hi-input3
77+ read x < ${ input3 }
78+ echo $x BAZ > $out
79+ '' ;
80+ rejectSystemFeatures = [ "bar" ] ;
81+ requiredSystemFeatures = [ "foo" ] ;
82+ } ;
83+
7284in
7385
7486mkDerivation {
7587 shell = busybox ;
7688 name = "build-remote" ;
77- passthru = { inherit input1 input2 input3 ; } ;
89+ passthru = {
90+ inherit
91+ input1
92+ input2
93+ input3
94+ input4
95+ ;
96+ } ;
7897 buildCommand = ''
7998 read x < ${ input1 }
8099 read y < ${ input3 }
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