windows tests: fix escaping, tmpdir in install

This commit is contained in:
Astro 2019-04-09 21:34:10 +02:00 committed by Sébastien Bourdeauducq
parent 5a2b863eb8
commit 4ec5ccb5fd

View File

@ -30,7 +30,7 @@ let
sshUser = "user"; sshUser = "user";
sshPassword = "user"; sshPassword = "user";
sshOpts = "-o StrictHostKeyChecking=accept-new -o UserKnownHostsFile=$TMPDIR/known_hosts"; sshOpts = "-o StrictHostKeyChecking=accept-new -o UserKnownHostsFile=\\$TMPDIR/known_hosts";
ssh = cmd: '' ssh = cmd: ''
echo "ssh windows \"${cmd}\"" echo "ssh windows \"${cmd}\""
sshpass -p${sshPassword} -- \ sshpass -p${sshPassword} -- \
@ -61,7 +61,7 @@ stdenv.mkDerivation {
#!/usr/bin/env bash #!/usr/bin/env bash
set -e -m set -e -m
TMPDIR=$(mktemp) TMPDIR=\$(mktemp -d)
if [ ! -f c.img ] ; then if [ ! -f c.img ] ; then
${qemu}/bin/qemu-img create -f qcow2 c.img ${diskImageSize} ${qemu}/bin/qemu-img create -f qcow2 c.img ${diskImageSize}
@ -106,7 +106,7 @@ stdenv.mkDerivation {
echo "Waiting for qemu exit" echo "Waiting for qemu exit"
wait wait
rm -rf $TMPDIR rm -rf \$TMPDIR
EOF EOF
chmod a+x $out/bin/networked-installer.sh chmod a+x $out/bin/networked-installer.sh
''; '';