2019-04-22 06:08:36 +08:00
|
|
|
# This runs `run-test.nix` with `nix-build`
|
|
|
|
|
2020-01-10 03:19:15 +08:00
|
|
|
{ pkgs ? import <nixpkgs> {}
|
|
|
|
, artiqpkgs ? import ../. { inherit pkgs; }
|
2020-01-27 18:31:26 +08:00
|
|
|
, diskImage ? (import ./build.nix { inherit pkgs; })
|
2020-01-10 03:19:15 +08:00
|
|
|
, qemuMem ? "2G"
|
|
|
|
, testTimeout ? 180
|
2019-04-08 23:41:05 +08:00
|
|
|
}:
|
|
|
|
|
|
|
|
with pkgs;
|
|
|
|
|
|
|
|
let
|
2019-04-18 21:54:06 +08:00
|
|
|
windowsRunner = overrides:
|
2020-01-10 03:19:15 +08:00
|
|
|
import ./run-test.nix (
|
|
|
|
{
|
|
|
|
inherit pkgs diskImage qemuMem testTimeout;
|
|
|
|
sipycoPkg = artiqpkgs.conda-sipyco;
|
|
|
|
artiqPkg = artiqpkgs.conda-artiq;
|
|
|
|
} // overrides
|
|
|
|
);
|
2019-04-15 07:12:48 +08:00
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2019-04-18 21:54:06 +08:00
|
|
|
name = "windows-test";
|
2019-04-15 07:12:48 +08:00
|
|
|
|
2019-04-18 21:54:06 +08:00
|
|
|
phases = [ "installPhase" "checkPhase" ];
|
|
|
|
installPhase = "touch $out";
|
|
|
|
doCheck = true;
|
|
|
|
checkPhase = ''
|
2019-04-24 11:21:06 +08:00
|
|
|
${windowsRunner { testCommand = "set ARTIQ_ROOT=%cd%\\anaconda\\envs\\artiq-env\\Lib\\site-packages\\artiq\\examples\\kc705_nist_clock&&python -m unittest discover -v artiq.test"; }}/bin/run.sh
|
2019-04-15 07:12:48 +08:00
|
|
|
'';
|
2019-04-14 07:54:36 +08:00
|
|
|
}
|