windows tests: capture failure, shutdown vm cleanly

This commit is contained in:
Astro 2019-04-20 01:17:39 +02:00
parent 19fd1a8e50
commit 287fb4a28b

View File

@ -60,7 +60,8 @@ stdenv.mkDerivation {
# Allow tests to run for 2 minutes
${ssh "shutdown -s -t ${toString testTimeout}"}
${ssh "anaconda\\scripts\\activate ${condaEnv} && ${testCommand}"}
FAIL=n
${ssh "anaconda\\scripts\\activate ${condaEnv} && ${testCommand}"} || FAIL=y
# Abort timeouted shutdown
${ssh "shutdown -a"}
@ -68,6 +69,8 @@ stdenv.mkDerivation {
${ssh "shutdown -p -f"}
wait
[ "\\$FAIL" = "y" ] && exit 1
EOF
chmod a+x $out/bin/run.sh
'';