summaryrefslogtreecommitdiff
path: root/tools/ci/jobs/deheader2.sh
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-04 14:52:31 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-04 14:52:31 +0300
commit507769ef665ad23780d874e99e9b16c7cc74f28f (patch)
tree7d5bdad309056e9bf16dc2169e70c4433c5373a1 /tools/ci/jobs/deheader2.sh
parent485ba81a87c50c23d1f97318e42f4937af1fda1f (diff)
downloadplus-507769ef665ad23780d874e99e9b16c7cc74f28f.tar.gz
plus-507769ef665ad23780d874e99e9b16c7cc74f28f.tar.bz2
plus-507769ef665ad23780d874e99e9b16c7cc74f28f.tar.xz
plus-507769ef665ad23780d874e99e9b16c7cc74f28f.zip
Add deheader into ci tools.
For now it running only for default flags and for default + SDL2.
Diffstat (limited to 'tools/ci/jobs/deheader2.sh')
-rwxr-xr-xtools/ci/jobs/deheader2.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/tools/ci/jobs/deheader2.sh b/tools/ci/jobs/deheader2.sh
new file mode 100755
index 000000000..94cf60cbe
--- /dev/null
+++ b/tools/ci/jobs/deheader2.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+export LOGFILE2=deheader2.log
+
+export DATA=$(cat ${LOGFILE})
+if [[ -z "${DATA}" ]]; then
+ echo "Empty output. Probably wrong search flags."
+ exit 1
+fi
+
+export DATA=$(grep "error:" ${LOGFILE})
+if [[ -n "${DATA}" ]]; then
+ echo "Compilation error found"
+ exit 1
+fi
+
+grep "deheader:" ${LOGFILE} \
+| grep -v "deheader: remove <climits> from ./src/being/localplayer.cpp" \
+| grep -v "deheader: remove <fstream> from ./src/utils/files.cpp" \
+| grep -v "deheader: remove <climits> from ./src/resources/map/map.cpp" \
+| grep -v "deheader: remove <sys/time.h> from ./src/resources/wallpaper.cpp" \
+| grep -v "deheader: remove <climits> from ./src/units.cpp" > ${LOGFILE2}
+
+export DATA=$(cat ${LOGFILE2})
+if [[ -n "${DATA}" ]]; then
+ echo "Wrong include files found"
+ echo ${DATA}
+ exit 1
+fi