Skip to content
Permalink
Browse files
test auto-generated sip files on Travis
  • Loading branch information
3nids committed Mar 30, 2017
1 parent 77d7236 commit 988c504d772fd518d6dfd78f5050e62265490ca3
Showing with 21 additions and 0 deletions.
  1. +1 −0 ci/travis/code_layout/CMakeLists.txt
  2. +20 −0 tests/scripts/test_auto_sipfiles.sh
@@ -8,3 +8,4 @@ ENABLE_TESTING()

ADD_TEST(qgis_indentation ${CMAKE_SOURCE_DIR}/../../../scripts/verify-indentation.sh)
ADD_TEST(qgis_spelling ${CMAKE_SOURCE_DIR}/../../../scripts/spell_check/spell_test.sh)
ADD_TEST(qgis_sip ${CMAKE_SOURCE_DIR}/../../../tests/scripts/test_auto_sipfiles.sh)
@@ -0,0 +1,20 @@
#!/usr/bin/env bash

DIR=$(git rev-parse --show-toplevel)

code=0

while read -r line; do
header="src/$line"
sipfile=$(sed -E 's/(.*)\.h/python\/\1.sip/' <<< $line)
outdiff=$(${DIR}/scripts/sipify.pl ${DIR}/$header | diff ${DIR}/$sipfile -)
if [[ -n $outdiff ]]; then
if [[ $code == 0 ]]; then
echo "some sip files are not up to date:"
code=1
fi
echo "$sipfile"
fi
done < ${DIR}/python/auto_sipfiles.txt

exit $code

0 comments on commit 988c504

Please sign in to comment.