Compare commits

...

4 Commits

3 changed files with 21 additions and 4 deletions

View File

@ -1,3 +1,5 @@
# This runs `run-test.nix` with `nix-build`
{ pkgs ? import <nixpkgs> {},
diskImage ? "/opt/windows/c.img",
qemuMem ? "2G",

View File

@ -57,7 +57,7 @@ stdenv.mkDerivation {
${ssh "anaconda\\scripts\\activate ${condaEnv} && conda install artiq.tar.bz2"}
done
# Allow tests to run for 2 minutes
# Schedule a timed shutdown against hanging test runs
${ssh "shutdown -s -t ${toString testTimeout}"}
FAIL=n
@ -69,8 +69,11 @@ stdenv.mkDerivation {
${ssh "shutdown -p -f"}
wait
[ "\\\$FAIL" = "y" ] && exit 1
if [ "\$FAIL" = "y" ]; then
exit 1
else
exit 0
fi
EOF
chmod a+x $out/bin/run.sh
'';

View File

@ -51,6 +51,18 @@ in
constituents = builtins.attrValues jobs;
};
windows-no-hardware-tests = pkgs.stdenv.mkDerivation {
name = "windows-no-hardware-tests";
# dummy src
src = generatedNix;
buildInputs = [ (windowsRunner {}) ];
phases = [ "buildPhase" ];
buildPhase = ''
${windowsRunner {}}/bin/run.sh
touch $out
'';
};
# HACK: Abuse fixed-output derivations to escape the sandbox and run the hardware
# unit tests, all integrated in the Hydra interface.
# One major downside of this hack is the tests are only run when generateTestOkHash
@ -89,7 +101,7 @@ in
export ARTIQ_LOW_LATENCY=1
python -m unittest discover -v artiq.test.coredevice
${windowsRunner { testCommand = "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"; }}/bin/run.sh
${windowsRunner { testCommand = "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"; }}/bin/run.sh
mkdir $out
cp ${generatedNix}/pkgs/artiq-version.nix $out/passed