From 9deb04cda7855d616e8cdf98e5e0edadddb2b82a Mon Sep 17 00:00:00 2001 From: Stephan Maka Date: Mon, 8 Apr 2019 18:12:20 +0200 Subject: [PATCH] windows tests: fake qemu rtc --- artiq/windows/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/artiq/windows/default.nix b/artiq/windows/default.nix index d1a8b1b..daf77dd 100644 --- a/artiq/windows/default.nix +++ b/artiq/windows/default.nix @@ -51,10 +51,13 @@ stdenv.mkDerivation { src = ./.; buildInputs = [ qemu sshpass openssh ]; buildPhase = '' + # +1 day from last modification of the disk image + CLOCK=$(date -Is -d @$(expr $(stat -c %Y ${diskImage}) + 86400)) ${runQemu [ "-boot" "order=c" "-snapshot" "-drive" "file=${diskImage},index=0,media=disk,cache=unsafe" + "-rtc" "base=$CLOCK" ]} & echo "Wait for Windows to boot" sleep 10