artiq-board: fix and simplify check for timing criteria

Re-fixes Gitea issue #15
This commit is contained in:
Astro 2020-06-25 00:21:48 +02:00
parent e87d2b4ecd
commit c00c10e223
1 changed files with 3 additions and 8 deletions

View File

@ -53,7 +53,7 @@ in
pkgs.python3Packages.toPythonModule (pkgs.stdenv.mkDerivation rec { pkgs.python3Packages.toPythonModule (pkgs.stdenv.mkDerivation rec {
name = "artiq-board-${target}-${variant}-${version}"; name = "artiq-board-${target}-${variant}-${version}";
version = import ./pkgs/artiq-version.nix (with pkgs; { inherit stdenv fetchgit git; }); version = import ./pkgs/artiq-version.nix (with pkgs; { inherit stdenv fetchgit git; });
phases = [ "buildPhase" "installCheckPhase" "installPhase" ]; phases = [ "buildPhase" "installCheckPhase" "installPhase" "checkPhase" ];
buildInputs = [ buildInputs = [
vivado vivado
pkgs.gnumake pkgs.gnumake
@ -69,16 +69,11 @@ pkgs.python3Packages.toPythonModule (pkgs.stdenv.mkDerivation rec {
export TARGET_AR=or1k-linux-ar export TARGET_AR=or1k-linux-ar
${buildCommand} ${buildCommand}
''; '';
doCheck = true;
checkPhase = '' checkPhase = ''
# Search for PCREs in the Vivado output to check for errors # Search for PCREs in the Vivado output to check for errors
check_log() { check_log() {
set +e grep -Pe "$1" artiq_${target}/${variant}/gateware/vivado.log && exit 1 || true
grep -Pe "$1" artiq_${target}/${variant}/gateware/vivado.log
FOUND=$?
set -e
if [ $FOUND != 1 ]; then
exit 1
fi
} }
check_log "\d+ constraint not met\." check_log "\d+ constraint not met\."
check_log "Timing constraints are not met\." check_log "Timing constraints are not met\."