[gjs: 1/2] CI: create a compiler warnings report
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 1/2] CI: create a compiler warnings report
- Date: Tue, 17 Apr 2018 05:45:31 +0000 (UTC)
commit 3bb6b1499036f0afda6f0694d7625d2c50eff02f
Author: Claudio André <claudioandre br gmail com>
Date: Mon Apr 16 17:30:41 2018 -0300
CI: create a compiler warnings report
.gitlab-ci.yml | 1 +
test/test-ci.sh | 16 +++++++++++++++-
2 files changed, 16 insertions(+), 1 deletion(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index dc130e3f..f8905318 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -75,6 +75,7 @@ fedora:
CC: gcc
DEV: devel
TEST: "check"
+ WARNINGS: "count"
#############################################
# Regular tests
diff --git a/test/test-ci.sh b/test/test-ci.sh
index 23599526..0b86248d 100755
--- a/test/test-ci.sh
+++ b/test/test-ci.sh
@@ -101,6 +101,14 @@ function do_Compare_With_Upstream_Master(){
fi
}
+function do_Check_Warnings(){
+
+ echo '-----------------------------------------'
+ cat compilation.log | grep "warning:" | awk '{total+=1}END{print "Total number of warnings: "total}'
+ echo '-----------------------------------------'
+
+}
+
# ----------- Run the Tests -----------
if [[ -n "${BUILD_OPTS}" ]]; then
extra_opts="($BUILD_OPTS)"
@@ -164,7 +172,7 @@ if [[ $1 == "GJS" ]]; then
echo "Autogen options: $ci_autogenargs"
eval ./autogen.sh "$ci_autogenargs"
- make -sj
+ make -sj 2>&1 | tee compilation.log
if [[ $TEST == "distcheck" ]]; then
make -s distcheck
@@ -174,6 +182,12 @@ if [[ $1 == "GJS" ]]; then
make -sj install
fi
+ if [[ $WARNINGS == "count" ]]; then
+ echo
+ echo '-- Warnings Report --'
+ do_Check_Warnings
+ fi
+
elif [[ $1 == "GJS_EXTRA" ]]; then
# Extra testing. It doesn't (re)build, just run the 'Installed Tests'
echo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]