run ARTIQ lit tests. Closes #3

This commit is contained in:
Sebastien Bourdeauducq 2019-03-31 22:33:19 +08:00
parent e139c5b80e
commit 7af143e73b
2 changed files with 11 additions and 3 deletions

View File

@ -42,7 +42,7 @@ in
llvm-or1k = callPackage ./pkgs/llvm-or1k.nix { inherit llvm-src; }; llvm-or1k = callPackage ./pkgs/llvm-or1k.nix { inherit llvm-src; };
llvmlite-artiq = callPackage ./pkgs/llvmlite-artiq.nix { inherit llvm-or1k; }; llvmlite-artiq = callPackage ./pkgs/llvmlite-artiq.nix { inherit llvm-or1k; };
libartiq-support = callPackage ./pkgs/libartiq-support.nix { inherit rustc; }; libartiq-support = callPackage ./pkgs/libartiq-support.nix { inherit rustc; };
artiq = callPackage ./pkgs/artiq.nix { inherit binutils-or1k; inherit llvm-or1k; inherit llvmlite-artiq; }; artiq = callPackage ./pkgs/artiq.nix { inherit binutils-or1k llvm-or1k llvmlite-artiq libartiq-support lit outputcheck; };
artiq-env = (pkgs.python3.withPackages(ps: [ artiq ])).overrideAttrs (oldAttrs: { name = "${pkgs.python3.name}-artiq-env-${artiq.version}"; }); artiq-env = (pkgs.python3.withPackages(ps: [ artiq ])).overrideAttrs (oldAttrs: { name = "${pkgs.python3.name}-artiq-env-${artiq.version}"; });
openocd = callPackage ./pkgs/openocd.nix {}; openocd = callPackage ./pkgs/openocd.nix {};
conda-artiq = import ./conda-artiq.nix { inherit pkgs; }; conda-artiq = import ./conda-artiq.nix { inherit pkgs; };

View File

@ -1,4 +1,4 @@
{ stdenv, callPackage, fetchgit, python3Packages, qt5Full, binutils-or1k, llvm-or1k, llvmlite-artiq }: { stdenv, callPackage, fetchgit, python3Packages, qt5Full, binutils-or1k, llvm-or1k, llvmlite-artiq, libartiq-support, lit, outputcheck }:
let let
pythonDeps = callPackage ./python-deps.nix {}; pythonDeps = callPackage ./python-deps.nix {};
@ -11,7 +11,15 @@ in
propagatedBuildInputs = [ binutils-or1k llvm-or1k llvmlite-artiq qt5Full ] propagatedBuildInputs = [ binutils-or1k llvm-or1k llvmlite-artiq qt5Full ]
++ (with pythonDeps; [ levenshtein pyqtgraph-qt5 quamash pythonparser asyncserial ]) ++ (with pythonDeps; [ levenshtein pyqtgraph-qt5 quamash pythonparser asyncserial ])
++ (with python3Packages; [ aiohttp pygit2 numpy dateutil scipy prettytable pyserial h5py pyqt5 ]); ++ (with python3Packages; [ aiohttp pygit2 numpy dateutil scipy prettytable pyserial h5py pyqt5 ]);
checkPhase = "python -m unittest discover -v artiq.test"; buildInputs = [ outputcheck ];
checkPhase =
''
python -m unittest discover -v artiq.test
testdir=`mktemp -d`
cp --no-preserve=mode,ownership -R ${src}/artiq/test/lit $testdir
LIBARTIQ_SUPPORT=${libartiq-support}/libartiq_support.so ${lit}/bin/lit -v $testdir/lit
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "A leading-edge control system for quantum information experiments"; description = "A leading-edge control system for quantum information experiments";
homepage = https://m-labs/artiq; homepage = https://m-labs/artiq;