1
0
Fork 0

windows tests: fake qemu rtc

This commit is contained in:
Astro 2019-04-08 18:12:20 +02:00 committed by Sébastien Bourdeauducq
parent 577966e11d
commit 9deb04cda7
1 changed files with 3 additions and 0 deletions

View File

@ -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