File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ ENDIF(WITH_ASTYLE)
5
5
ADD_TEST (qgis_spelling ${CMAKE_SOURCE_DIR} /scripts/spell_check/spell_test.sh )
6
6
7
7
ADD_TEST (qgis_sipify ${CMAKE_SOURCE_DIR} /tests/code_layout/test_sipify.sh )
8
+ ADD_TEST (qgis_sip_include ${CMAKE_SOURCE_DIR} /tests/code_layout/test_sip_include.sh )
8
9
ADD_TEST (qgis_sip_uptodate ${CMAKE_SOURCE_DIR} /tests/code_layout/test_sipfiles_uptodate.sh )
9
10
10
11
IF (WITH_APIDOC )
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ DIR=$( git rev-parse --show-toplevel)
4
+ REV=$( git log -n1 --pretty=%H)
5
+
6
+ # GNU prefix command for mac os support (gsed, gsplit)
7
+ GP=
8
+ if [[ " $OSTYPE " =~ darwin* ]]; then
9
+ GP=g
10
+ fi
11
+
12
+ pushd ${DIR} > /dev/null
13
+
14
+ code=0
15
+ modules=(core gui analysis server)
16
+ for module in " ${modules[@]} " ; do
17
+ cp python/${module} /${module} _auto.sip python/${module} /${module} _auto.sip.$REV .bak
18
+ done
19
+
20
+ ./scripts/sip_include.sh
21
+
22
+ for module in " ${modules[@]} " ; do
23
+ outdiff=$( diff python/${module} /${module} _auto.sip python/${module} /${module} _auto.sip.$REV .bak)
24
+ if [[ -n $outdiff ]]; then
25
+ echo -e " *** SIP include file for \x1B[33m${module} \x1B[0m not up to date."
26
+ echo " $outdiff "
27
+ code=1
28
+ mv python/${module} /${module} _auto.sip.$REV .bak python/${module} /${module} _auto.sip
29
+ else
30
+ rm python/${module} /${module} _auto.sip.$REV .bak
31
+ fi
32
+ done
33
+
34
+ if [[ code -eq 1 ]]; then
35
+ echo -e " Run \x1B[33m./scripts/sip_include.sh\x1B[0m to add to fix this."
36
+ echo -e " If a header should not have a sip file created, add \x1B[33m#define SIP_NO_FILE\x1B[0m."
37
+ fi
38
+
39
+ popd > /dev/null
40
+
41
+ exit $code
You can’t perform that action at this time.
0 commit comments