forked from M-Labs/nix-scripts
windows tests: capture failure, shutdown vm cleanly
This commit is contained in:
parent
19fd1a8e50
commit
287fb4a28b
|
@ -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
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in New Issue