QGIS/tests/code_layout/sipify/test_sipify.sh

26 lines
617 B
Bash
Raw Normal View History

#!/usr/bin/env bash
# This runs sipify on the demo header and checks output
2019-11-11 13:14:50 +01:00
srcdir=$(dirname $0)/../../
DIR=$(git -C ${srcdir} rev-parse --show-toplevel)
2018-06-21 11:51:22 +10:00
pushd ${DIR} > /dev/null || exit
2023-12-11 10:18:23 +01:00
for pyqt_version in 5 6; do
if [[ $pyqt_version == 6 ]]; then
IS_QT6="--qt6"
fi
2023-12-11 10:18:23 +01:00
outdiff=$(./scripts/sipify.pl $IS_QT6 tests/code_layout/sipify/sipifyheader.h | diff tests/code_layout/sipify/sipifyheader.expected_pyqt$pyqt_version.sip -)
if [[ $outdiff ]]; then
echo " *** sipify.pl did not output expected file"
echo "$outdiff"
popd > /dev/null || exit
exit 1
fi
done
popd > /dev/null || exit