1
0
Fork 0

windows tests: run tests for standalone and kc705_nist_clock

This commit is contained in:
Astro 2019-04-14 01:54:36 +02:00 committed by Sébastien Bourdeauducq
parent f3fca76dd6
commit 858b3de2e4
2 changed files with 52 additions and 37 deletions

View File

@ -34,9 +34,10 @@ let
ssh = qemu.ssh;
scp = qemu.scp;
condaEnv = "artiq-env";
in
makeTest = name: testCommand:
stdenv.mkDerivation {
name = "windows-test-conda-artiq";
name = "windows-test-conda-artiq-${name}";
outputHashAlgo = "sha256";
outputHashMode = "recursive";
@ -53,6 +54,7 @@ in
"-snapshot"
"-drive" "file=${diskImage},index=0,media=disk,cache=unsafe"
"-rtc" "base=$CLOCK"
"-display" "none"
]} &
echo "Wait for Windows to boot"
@ -66,7 +68,7 @@ in
# Allow tests to run for 2 minutes
${ssh "shutdown -s -t ${toString testTimeout}"}
${ssh "anaconda\\scripts\\activate ${condaEnv} && python -m unittest discover -v artiq.test"}
${testCommand}
# Abort timeouted shutdown
${ssh "shutdown -a"}
@ -76,4 +78,18 @@ in
mkdir $out
cp ${artiqVersion} $out/passed
'';
}
};
in {
standalone =
makeTest "standalone"
(ssh "anaconda\\scripts\\activate ${condaEnv} && python -m unittest discover -v artiq.test");
kc705 =
makeTest "kc705"
# This weirdly mangled syntax is legit for Windows
(ssh (builtins.replaceStrings [ "\n" ] [ "" ] ''
anaconda\scripts\activate ${condaEnv}
&& set ARTIQ_ROOT=%cd%\anaconda\envs\artiq-env\Lib\site-packages\artiq\examples\kc705_nist_clock
&& set ARTIQ_LOW_LATENCY=1
&& python -m unittest discover -v artiq.test.coredevice
''));
}

View File

@ -15,7 +15,6 @@ let
args = [
"-enable-kvm"
"-m" qemuMem
"-display" "none"
"-bios" "${OVMF.fd}/FV/OVMF.fd"
"-netdev" "user,id=n1,restrict=on,hostfwd=tcp::2022-:22" "-device" "e1000,netdev=n1"
];