forked from M-Labs/nix-scripts
artiq-board: check for constraint errors in vivado.log
Should fix Gitea issue #15
This commit is contained in:
parent
5f7def845a
commit
00e518e77d
@ -47,11 +47,22 @@ let
|
||||
in pkgs.python3Packages.buildPythonPackage rec {
|
||||
name = "artiq-board-${target}-${variant}-${version}";
|
||||
version = import ./pkgs/artiq-version.nix (with pkgs; { inherit stdenv fetchgit git; });
|
||||
phases = [ "buildPhase" "installPhase" ];
|
||||
phases = [ "buildPhase" "installCheckPhase" "installPhase" ];
|
||||
buildPhase =
|
||||
''
|
||||
${buildenv}/bin/artiq-dev -c "export CARGO_HOME=${cargoVendored}; ${buildCommand}"
|
||||
'';
|
||||
preCheck = ''
|
||||
# Search for PCREs in the Vivado output to check for errors
|
||||
function check_log() {
|
||||
grep -Pe "$1" artiq_${target}/${variant}/gateware/vivado.log
|
||||
if [ $? -ne 1 ]; then
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
check_log "\d+ constraint not met\."
|
||||
check_log "Timing constraints are not met\."
|
||||
'';
|
||||
installPhase =
|
||||
''
|
||||
TARGET_DIR=$out/${pkgs.python3Packages.python.sitePackages}/artiq/board-support/${target}-${variant}
|
||||
|
Loading…
Reference in New Issue
Block a user