forked from M-Labs/nix-scripts
windows tests: fake qemu rtc
This commit is contained in:
parent
577966e11d
commit
9deb04cda7
|
@ -51,10 +51,13 @@ stdenv.mkDerivation {
|
||||||
src = ./.;
|
src = ./.;
|
||||||
buildInputs = [ qemu sshpass openssh ];
|
buildInputs = [ qemu sshpass openssh ];
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
|
# +1 day from last modification of the disk image
|
||||||
|
CLOCK=$(date -Is -d @$(expr $(stat -c %Y ${diskImage}) + 86400))
|
||||||
${runQemu [
|
${runQemu [
|
||||||
"-boot" "order=c"
|
"-boot" "order=c"
|
||||||
"-snapshot"
|
"-snapshot"
|
||||||
"-drive" "file=${diskImage},index=0,media=disk,cache=unsafe"
|
"-drive" "file=${diskImage},index=0,media=disk,cache=unsafe"
|
||||||
|
"-rtc" "base=$CLOCK"
|
||||||
]} &
|
]} &
|
||||||
echo "Wait for Windows to boot"
|
echo "Wait for Windows to boot"
|
||||||
sleep 10
|
sleep 10
|
||||||
|
|
Loading…
Reference in New Issue