2019-04-22 06:08:36 +08:00
|
|
|
# This runs `run-test.nix` with `nix-build`
|
|
|
|
|
2019-04-08 23:41:05 +08:00
|
|
|
{ pkgs ? import <nixpkgs> {},
|
|
|
|
diskImage ? "/opt/windows/c.img",
|
|
|
|
qemuMem ? "2G",
|
2019-04-14 08:00:37 +08:00
|
|
|
testTimeout ? 180,
|
2019-04-08 23:41:05 +08:00
|
|
|
}:
|
|
|
|
|
|
|
|
with pkgs;
|
|
|
|
|
|
|
|
let
|
2019-04-18 21:54:06 +08:00
|
|
|
windowsRunner = overrides:
|
2019-04-23 00:59:28 +08:00
|
|
|
import ./run-test.nix ({
|
2019-04-18 21:54:06 +08:00
|
|
|
inherit pkgs diskImage qemuMem testTimeout;
|
2019-04-23 00:59:28 +08:00
|
|
|
} // 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
|
|
|
}
|