artiq-board: fix check for constraint errors

This commit is contained in:
Astro 2019-05-27 23:06:01 +02:00
parent 4dffefa46f
commit 91e94bf773
1 changed files with 7 additions and 3 deletions

View File

@ -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
}