1
0
Fork 0

windows tests: revamp conda env

This commit is contained in:
Astro 2019-04-11 16:22:17 +02:00 committed by Sébastien Bourdeauducq
parent dadb1a0b2e
commit 315688cd74
2 changed files with 8 additions and 5 deletions

View File

@ -36,10 +36,11 @@ let
${openssh}/bin/scp -P 2022 ${sshOpts} \ ${openssh}/bin/scp -P 2022 ${sshOpts} \
"${src}" "${sshUser}@localhost:${target}" "${src}" "${sshUser}@localhost:${target}"
''; '';
condaEnv = "artiq-env";
installCondaPkg = pkg: '' installCondaPkg = pkg: ''
F="$(basename ${pkg})" F="$(basename ${pkg})"
${scp pkg "$F"} ${scp pkg "$F"}
${ssh "miniconda\\Scripts\\conda install $F"} ${ssh "miniconda\\Scripts\\conda install -y -n ${condaEnv} $F"}
${ssh "del $F"} ${ssh "del $F"}
''; '';
makeTest = name: artiqPkg: makeTest = name: artiqPkg:
@ -72,7 +73,7 @@ let
# 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 && miniconda\\python -m unittest discover -v artiq.test"} ${ssh "miniconda\\scripts\\activate ${condaEnv} && miniconda\\envs\\${condaEnv}\\python -m unittest discover -v artiq.test"}
# Abort timeouted shutdown # Abort timeouted shutdown
${ssh "shutdown -a"} ${ssh "shutdown -a"}

View File

@ -98,9 +98,11 @@ stdenv.mkDerivation {
${scp miniconda "Miniconda.exe"} ${scp miniconda "Miniconda.exe"}
${ssh "start /wait \"\" Miniconda.exe /S /D=%cd%\\miniconda"} ${ssh "start /wait \"\" Miniconda.exe /S /D=%cd%\\miniconda"}
${ssh "del Miniconda.exe"} ${ssh "del Miniconda.exe"}
${ssh "miniconda\\Scripts\\conda update -y python"}
${ssh "miniconda\\Scripts\\conda install -y numpy h5py"} ${ssh "miniconda\\Scripts\\conda config --add channels conda-forge"}
${ssh "miniconda\\Scripts\\conda install -y -c m-labs pythonparser"} ${ssh "miniconda\\Scripts\\conda config --add channels m-labs"}
${ssh "miniconda\\Scripts\\conda create -y -n artiq-env"}
${ssh "miniconda\\Scripts\\conda install -y -n artiq-env numpy scipy python-dateutil h5py pythonparser levenshtein outputcheck"}
${ssh "shutdown /p /f"} ${ssh "shutdown /p /f"}
echo "Waiting for qemu exit" echo "Waiting for qemu exit"