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
1 changed files with 4 additions and 1 deletions

View File

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