fix sip test

only check for Python file if it is produced
This commit is contained in:
Denis Rouzaud 2018-06-05 20:42:46 -04:00
parent 4e38d0696e
commit b2274258a4

View File

@ -25,16 +25,18 @@ for module in "${modules[@]}"; do
echo "*** Missing header: $header for sipfile $sipfile" echo "*** Missing header: $header for sipfile $sipfile"
else else
outdiff=$(./scripts/sipify.pl -p python/${module}/auto_additions/${pyfile}.temp $header | diff python/$sipfile.in -) outdiff=$(./scripts/sipify.pl -p python/${module}/auto_additions/${pyfile}.temp $header | diff python/$sipfile.in -)
outdiff2=$(diff python/${module}/auto_additions/${pyfile} python/${module}/auto_additions/${pyfile}.temp)
if [[ -n "$outdiff" ]]; then if [[ -n "$outdiff" ]]; then
echo " *** SIP file not up to date: $sipfile" echo " *** SIP file not up to date: $sipfile"
code=1 code=1
fi fi
if [[ -f python/${module}/auto_additions/${pyfile}.temp ]]; then
outdiff2=$(diff python/${module}/auto_additions/${pyfile} python/${module}/auto_additions/${pyfile}.temp)
if [[ -n "$outdiff2" ]]; then if [[ -n "$outdiff2" ]]; then
echo " *** Python addition file not up to date: $sipfile" echo " *** Python addition file not up to date: $sipfile"
code=1 code=1
fi fi
fi fi
fi
done < <( done < <(
${GP}sed -n -r "s@^%Include auto_generated/(.*\.sip)@${module}/auto_generated/\1@p" python/${module}/${module}_auto.sip ${GP}sed -n -r "s@^%Include auto_generated/(.*\.sip)@${module}/auto_generated/\1@p" python/${module}/${module}_auto.sip
) )