forked from M-Labs/nix-scripts
windows tests: move to checkPhase
This commit is contained in:
parent
688bc38973
commit
5a2b863eb8
@ -46,8 +46,13 @@ let
|
||||
stdenv.mkDerivation {
|
||||
name = "windows-test-${name}";
|
||||
src = ./.;
|
||||
buildInputs = [ qemu sshpass openssh ];
|
||||
buildPhase = ''
|
||||
dontBuild = true;
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
'';
|
||||
doCheck = true;
|
||||
checkInputs = [ qemu sshpass openssh ];
|
||||
checkPhase = ''
|
||||
# +1 day from last modification of the disk image
|
||||
CLOCK=$(date -Is -d @$(expr $(stat -c %Y ${diskImage}) + 86400))
|
||||
${runQemu [
|
||||
@ -56,23 +61,24 @@ let
|
||||
"-drive" "file=${diskImage},index=0,media=disk,cache=unsafe"
|
||||
"-rtc" "base=$CLOCK"
|
||||
]} &
|
||||
|
||||
echo "Wait for Windows to boot"
|
||||
sleep 10
|
||||
${ssh "ver"}
|
||||
for pkg in ${artiqPkg}/noarch/*.tar.bz2 ; do
|
||||
${installCondaPkg "$pkg"}
|
||||
done
|
||||
|
||||
# Allow tests to run for 2 minutes
|
||||
${ssh "shutdown -s -t ${toString testTimeout}"}
|
||||
|
||||
${ssh "miniconda\\scripts\\activate && miniconda\\python -m unittest discover -v artiq.test"}
|
||||
|
||||
# Abort timeouted shutdown
|
||||
${ssh "shutdown -a"}
|
||||
# Power off immediately
|
||||
${ssh "shutdown -p -f"}
|
||||
'';
|
||||
installPhase = ''
|
||||
echo Done
|
||||
'';
|
||||
};
|
||||
condaPackageNames =
|
||||
builtins.filter (name: builtins.match "conda-.+" name != null)
|
||||
|
Loading…
Reference in New Issue
Block a user