windows tests: get latest anaconda version working

This commit is contained in:
Astro 2019-04-13 23:34:23 +02:00 committed by Sébastien Bourdeauducq
parent b4b0ad7a22
commit ac89dfeb70
2 changed files with 15 additions and 15 deletions

View File

@ -40,13 +40,13 @@ in
${ssh "ver"} ${ssh "ver"}
for pkg in ${artiqPkg}/noarch/artiq*.tar.bz2 ; do for pkg in ${artiqPkg}/noarch/artiq*.tar.bz2 ; do
${scp "\$pkg" "artiq.tar.bz2"} ${scp "\$pkg" "artiq.tar.bz2"}
${ssh "miniconda\\scripts\\activate ${condaEnv} && conda install artiq.tar.bz2"} ${ssh "anaconda\\scripts\\activate ${condaEnv} && conda install artiq.tar.bz2"}
done done
# Allow tests to run for 2 minutes # Allow tests to run for 2 minutes
${ssh "shutdown -s -t ${toString testTimeout}"} ${ssh "shutdown -s -t ${toString testTimeout}"}
${ssh "miniconda\\scripts\\activate ${condaEnv} && python -m unittest discover -v artiq.test"} ${ssh "anaconda\\scripts\\activate ${condaEnv} && python -m unittest discover -v artiq.test"}
# Abort timeouted shutdown # Abort timeouted shutdown
${ssh "shutdown -a"} ${ssh "shutdown -a"}

View File

@ -10,10 +10,9 @@ let
url = "https://software-download.microsoft.com/download/sg/17763.107.101029-1455.rs5_release_svc_refresh_CLIENT_LTSC_EVAL_x64FRE_en-us.iso"; url = "https://software-download.microsoft.com/download/sg/17763.107.101029-1455.rs5_release_svc_refresh_CLIENT_LTSC_EVAL_x64FRE_en-us.iso";
sha256 = "668fe1af70c2f7416328aee3a0bb066b12dc6bbd2576f40f812b95741e18bc3a"; sha256 = "668fe1af70c2f7416328aee3a0bb066b12dc6bbd2576f40f812b95741e18bc3a";
}; };
# Newer Miniconda contains unusable OpenSSL, preventing any package fetching anaconda = fetchurl {
miniconda = fetchurl { url = "https://repo.anaconda.com/archive/Anaconda3-2019.03-Windows-x86_64.exe";
url = "https://repo.anaconda.com/miniconda/Miniconda3-4.5.11-Windows-x86_64.exe"; sha256 = "1f9icm5rwab6l1f23a70dw0qixzrl62wbglimip82h4zhxlh3jfj";
sha256 = "1kyf03571fhxd0a9f8bcpmqfdpw7461kclfyb4yb3dsi783y4sck";
}; };
qemu = import ./qemu.nix { qemu = import ./qemu.nix {
@ -24,6 +23,7 @@ let
ssh = cmd: qemu.ssh (qemu.escape cmd); ssh = cmd: qemu.ssh (qemu.escape cmd);
scp = qemu.scp; scp = qemu.scp;
sshCondaEnv = cmd: ssh "anaconda\\scripts\\activate && ${cmd}";
condaEnv = "artiq-env"; condaEnv = "artiq-env";
condaDepSpecs = condaDepSpecs =
builtins.concatStringsSep " " builtins.concatStringsSep " "
@ -68,18 +68,18 @@ stdenv.mkDerivation {
cat ${instructions} cat ${instructions}
read read
${ssh "ver"} ${ssh "ver"}
${scp miniconda "Miniconda.exe"} ${scp anaconda "Anaconda.exe"}
${ssh "start /wait \"\" Miniconda.exe /S /D=%cd%\\miniconda"} ${ssh "start /wait \"\" Anaconda.exe /S /D=%cd%\\anaconda"}
${ssh "del Miniconda.exe"}
${ssh "miniconda\\Scripts\\conda config --add channels conda-forge"} ${sshCondaEnv "conda config --add channels conda-forge"}
${ssh "miniconda\\Scripts\\conda config --add channels m-labs"} ${sshCondaEnv "conda config --add channels m-labs"}
${ssh "miniconda\\Scripts\\conda update -y conda"} ( ${sshCondaEnv "conda update -y conda"} ) || true
${ssh "miniconda\\Scripts\\conda update -y --all"} ${sshCondaEnv "conda update -y --all"}
${ssh "miniconda\\Scripts\\conda create -y -n ${condaEnv}"} ${sshCondaEnv "conda create -y -n ${condaEnv}"}
${ssh "miniconda\\Scripts\\conda install -y -n ${condaEnv} ${condaDepSpecs}"} ${sshCondaEnv "conda install -y -n ${condaEnv} ${condaDepSpecs}"}
${ssh "shutdown /p /f"} ${ssh "shutdown /p /f"}
echo "Waiting for qemu exit" echo "Waiting for qemu exit"