make-wrapper: fixup #14753 changes to make tests work

The tests need to expand passed variable and very carefully.
I could see no other easy way than to change single-quoting in
makeWrapper to double-quoting.
The tests now fail with the same problem as on master...
This commit is contained in:
Vladimír Čunát 2016-06-19 13:38:46 +02:00
parent e757404555
commit 61b8d27b4c
2 changed files with 5 additions and 5 deletions

View file

@ -113,14 +113,14 @@ rec {
--add-flags "$vms" \ --add-flags "$vms" \
${lib.optionalString enableOCR "--prefix PATH : '${ocrProg}/bin'"} \ ${lib.optionalString enableOCR "--prefix PATH : '${ocrProg}/bin'"} \
--run "testScript=\"\$(cat $out/test-script)\"" \ --run "testScript=\"\$(cat $out/test-script)\"" \
--set testScript '"$testScript"' \ --set testScript '$testScript' \
--set VLANS '"${toString vlans}"' --set VLANS '${toString vlans}'
ln -s ${testDriver}/bin/nixos-test-driver $out/bin/nixos-run-vms ln -s ${testDriver}/bin/nixos-test-driver $out/bin/nixos-run-vms
wrapProgram $out/bin/nixos-run-vms \ wrapProgram $out/bin/nixos-run-vms \
--add-flags "$vms" \ --add-flags "$vms" \
${lib.optionalString enableOCR "--prefix PATH : '${ocrProg}/bin'"} \ ${lib.optionalString enableOCR "--prefix PATH : '${ocrProg}/bin'"} \
--set tests '"startAll; joinAll;"' \ --set tests 'startAll; joinAll;' \
--set VLANS '"${toString vlans}"' \ --set VLANS '${toString vlans}' \
${lib.optionalString (builtins.length vms == 1) "--set USE_SERIAL 1"} ${lib.optionalString (builtins.length vms == 1) "--set USE_SERIAL 1"}
''; # " ''; # "

View file

@ -16,7 +16,7 @@ makeWrapper() {
varName=${params[$((n + 1))]} varName=${params[$((n + 1))]}
value=${params[$((n + 2))]} value=${params[$((n + 2))]}
n=$((n + 2)) n=$((n + 2))
echo "export $varName='$value'" >> $wrapper echo "export $varName=\"$value\"" >> $wrapper
fi fi
if test "$p" = "--unset"; then if test "$p" = "--unset"; then