From e3b46e9f748a6751b2cc99acd520dc2be20c520a Mon Sep 17 00:00:00 2001 From: Stephan Maka Date: Thu, 18 Apr 2019 18:13:55 +0200 Subject: [PATCH] windows tests: set -e and wait for bg job --- artiq/windows/run-test.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/artiq/windows/run-test.nix b/artiq/windows/run-test.nix index 770e7ee..01cac4a 100644 --- a/artiq/windows/run-test.nix +++ b/artiq/windows/run-test.nix @@ -36,6 +36,8 @@ stdenv.mkDerivation { installPhase = '' mkdir -p $out/bin cat > $out/bin/run.sh << EOF + set -e -m + # +1 day from last modification of the disk image CLOCK=$(date -Is -d @$(expr $(stat -c %Y ${diskImage}) + 86400)) ${qemu.runQemu true forwardedPorts [ @@ -64,6 +66,8 @@ stdenv.mkDerivation { ${ssh "shutdown -a"} # Power off immediately ${ssh "shutdown -p -f"} + wait + EOF chmod a+x $out/bin/run.sh '';