From 91e94bf773dd8f727c5594dcf685a6448fb712db Mon Sep 17 00:00:00 2001 From: Stephan Maka Date: Mon, 27 May 2019 23:06:01 +0200 Subject: [PATCH] artiq-board: fix check for constraint errors --- artiq/artiq-board.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/artiq/artiq-board.nix b/artiq/artiq-board.nix index e503d7f..e3671e6 100644 --- a/artiq/artiq-board.nix +++ b/artiq/artiq-board.nix @@ -52,10 +52,14 @@ in pkgs.python3Packages.buildPythonPackage rec { '' ${buildenv}/bin/artiq-dev -c "export CARGO_HOME=${cargoVendored}; ${buildCommand}" ''; - preCheck = '' + checkPhase = '' # Search for PCREs in the Vivado output to check for errors - function check_log() { - if [ $(grep -Pe "$1" artiq_${target}/${variant}/gateware/vivado.log) != 1 ]; then + check_log() { + set +e + grep -Pe "$1" artiq_${target}/${variant}/gateware/vivado.log + FOUND=$? + set -e + if [ $FOUND != 1 ]; then exit 1 fi }