summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml52
-rwxr-xr-xtools/ci/jobs/deheader.sh8
-rw-r--r--tools/ci/samples/test3.h4
-rw-r--r--tools/ci/samples/test4.h4
-rw-r--r--tools/ci/samples/test7.cpp16
-rw-r--r--tools/ci/samples/test7.h16
6 files changed, 89 insertions, 11 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index cfbd4b3..584a494 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -9,7 +9,7 @@ before_script:
test1_cpp:
stage: build
script:
- - ./tools/ci/jobs/deheader.sh "g++-5" test1.cpp
+ - ./tools/ci/jobs/deheader.sh "g++-5" "" test1.cpp
- ./tools/ci/jobs/deheaderok.sh
image: debian:unstable
tags:
@@ -18,7 +18,7 @@ test1_cpp:
test1_h:
stage: build
script:
- - ./tools/ci/jobs/deheader.sh "g++-5" test1.h
+ - ./tools/ci/jobs/deheader.sh "g++-5" "" test1.h
- ./tools/ci/jobs/deheaderok.sh
image: debian:unstable
tags:
@@ -27,7 +27,7 @@ test1_h:
test2_cpp:
stage: build
script:
- - ./tools/ci/jobs/deheader.sh "g++-5" test2.cpp
+ - ./tools/ci/jobs/deheader.sh "g++-5" "" test2.cpp
- ./tools/ci/jobs/deheadererror.sh "include1.h"
image: debian:unstable
tags:
@@ -36,7 +36,16 @@ test2_cpp:
test3_cpp:
stage: build
script:
- - ./tools/ci/jobs/deheader.sh "g++-5" test3.cpp
+ - ./tools/ci/jobs/deheader.sh "g++-5" "" test3.cpp
+ - ./tools/ci/jobs/deheadererror.sh "include1.h"
+ image: debian:unstable
+ tags:
+ - docker
+
+test3_h:
+ stage: build
+ script:
+ - ./tools/ci/jobs/deheader.sh "g++-5" "" test3.h
- ./tools/ci/jobs/deheadererror.sh "include1.h"
image: debian:unstable
tags:
@@ -45,17 +54,26 @@ test3_cpp:
test4_cpp:
stage: build
script:
- - ./tools/ci/jobs/deheader.sh "g++-5" test4.cpp
+ - ./tools/ci/jobs/deheader.sh "g++-5" "" test4.cpp
- ./tools/ci/jobs/deheadererror.sh "include1.h"
- ./tools/ci/jobs/deheadererror.sh "include2.h"
image: debian:unstable
tags:
- docker
+test4_h:
+ stage: build
+ script:
+ - ./tools/ci/jobs/deheader.sh "g++-5" "" test4.h
+ - ./tools/ci/jobs/deheaderok.sh
+ image: debian:unstable
+ tags:
+ - docker
+
test5_h:
stage: build
script:
- - ./tools/ci/jobs/deheader.sh "g++-5" test5.h
+ - ./tools/ci/jobs/deheader.sh "g++-5" "" test5.h
- ./tools/ci/jobs/deheadererror.sh "include1.h"
image: debian:unstable
tags:
@@ -64,12 +82,32 @@ test5_h:
test6_cpp:
stage: build
script:
- - ./tools/ci/jobs/deheader.sh "g++-5" test6.cpp
+ - ./tools/ci/jobs/deheader.sh "g++-5" "" test6.cpp
- ./tools/ci/jobs/deheadererror.sh "include1.h"
image: debian:unstable
tags:
- docker
+test7_cpp:
+ stage: build
+ script:
+ - ./tools/ci/jobs/deheader.sh "g++-5" "-DQQQ" test7.cpp
+ - ./tools/ci/jobs/deheadererror.sh "include2.h"
+ - ./tools/ci/jobs/deheadererror.sh "include3.h"
+ image: debian:unstable
+ tags:
+ - docker
+
+test7_h:
+ stage: build
+ script:
+ - ./tools/ci/jobs/deheader.sh "g++-5" "-DQQQ" test7.h
+ - ./tools/ci/jobs/deheadererror.sh "include2.h"
+ - ./tools/ci/jobs/deheadererror.sh "include3.h"
+ image: debian:unstable
+ tags:
+ - docker
+
# reports
success:
diff --git a/tools/ci/jobs/deheader.sh b/tools/ci/jobs/deheader.sh
index ff9c4db..0b4e624 100755
--- a/tools/ci/jobs/deheader.sh
+++ b/tools/ci/jobs/deheader.sh
@@ -7,15 +7,15 @@ source ./tools/ci/scripts/init.sh
aptget_install python gcc-5 g++-5
export dir=$(pwd)
-export var=$2
+export var=$3
export name=${var%.*}
export name=${name#./src/}
export name=${name##*./}.h
-echo $2 >>${LOGFILE}
-echo $2
+echo $3 >>${LOGFILE}
+echo $3
${dir}/deheader -q \
-c "$1" \
--m "-c -std=gnu++1z -Werror -Wall -Wextra -Wundef -Wmissing-declarations -I/usr/include -I${dir}/tools/ci/samples" ${dir}/tools/ci/samples/$2 \
+-m "-c -std=gnu++1z -Werror -Wall -Wextra -Wundef -Wmissing-declarations $2 -I/usr/include -I${dir}/tools/ci/samples" ${dir}/tools/ci/samples/$3 \
| grep -v "portability requires" | tee -a ${LOGFILE}
diff --git a/tools/ci/samples/test3.h b/tools/ci/samples/test3.h
index 7f2669e..3e82ac1 100644
--- a/tools/ci/samples/test3.h
+++ b/tools/ci/samples/test3.h
@@ -1,6 +1,10 @@
#ifndef TEST3
#define TEST3
+#ifndef QQQ
+#include "include1.h"
+#endif // QQQ
+
int function1();
#endif // TEST3 \ No newline at end of file
diff --git a/tools/ci/samples/test4.h b/tools/ci/samples/test4.h
index f578ad2..244345a 100644
--- a/tools/ci/samples/test4.h
+++ b/tools/ci/samples/test4.h
@@ -3,4 +3,8 @@
int function1();
+#ifdef QQQ
+#include "include1.h"
+#endif // QQQ
+
#endif // TEST4 \ No newline at end of file
diff --git a/tools/ci/samples/test7.cpp b/tools/ci/samples/test7.cpp
new file mode 100644
index 0000000..ab5c327
--- /dev/null
+++ b/tools/ci/samples/test7.cpp
@@ -0,0 +1,16 @@
+#include "test7.h"
+
+#ifndef QQQ
+#include "include1.h"
+#else // QQQ
+#include "include2.h"
+#endif // QQQ
+
+int function1()
+{
+ return 0;
+}
+
+#ifdef QQQ
+#include "include3.h"
+#endif // QQQ
diff --git a/tools/ci/samples/test7.h b/tools/ci/samples/test7.h
new file mode 100644
index 0000000..a7aa345
--- /dev/null
+++ b/tools/ci/samples/test7.h
@@ -0,0 +1,16 @@
+#ifndef TEST7
+#define TEST7
+
+int function1();
+
+#ifndef QQQ
+#include "include1.h"
+#else // QQQ
+#include "include2.h"
+#endif // QQQ
+
+#ifdef QQQ
+#include "include3.h"
+#endif // QQQ
+
+#endif // TEST7 \ No newline at end of file