From d0ca8f12e8561aa80ba6d47404e37fa570c2f8e3 Mon Sep 17 00:00:00 2001
From: Raphael Defosseux <raphael.defosseux@eurecom.fr>
Date: Mon, 8 Jun 2020 11:04:27 +0200
Subject: [PATCH] CI: handling of new compilation warnings

Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
---
 ci-scripts/checkAddedWarnings.sh | 2 +-
 ci-scripts/reportBuildLocally.sh | 4 ++--
 cmake_targets/build_oai          | 4 ++--
 cmake_targets/tools/build_helper | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/ci-scripts/checkAddedWarnings.sh b/ci-scripts/checkAddedWarnings.sh
index d366059a853..bda8287a784 100755
--- a/ci-scripts/checkAddedWarnings.sh
+++ b/ci-scripts/checkAddedWarnings.sh
@@ -110,7 +110,7 @@ MODIFIED_FILES=`git log $TARGET_INIT_COMMIT..$MERGE_COMMMIT --oneline --name-sta
 NB_WARNINGS_FILES=0
 
 # Retrieve list of warnings 
-LIST_WARNING_FILES=`egrep "error:|warning:" archives/*/*.Rel15.txt archives/*/basic_simulator_*txt | egrep -v "jobserver unavailable|Clock skew detected.|flexran.proto" | sed -e "s#^.*/home/ubuntu/tmp/##" -e "s#^.*/tmp/CI-eNB/##" -e "s#common/utils/.*/itti#common/utils/itti#" | awk -F ":" '{print $1}' | sort | uniq`
+LIST_WARNING_FILES=`egrep "error:|warning:" archives/*/*.Rel15.txt | egrep -v "jobserver unavailable|Clock skew detected.|flexran.proto" | sed -e "s#^.*/home/ubuntu/tmp/##" -e "s#^.*/tmp/CI-eNB/##" -e "s#common/utils/.*/itti#common/utils/itti#" | awk -F ":" '{print $1}' | sort | uniq`
 
 echo ""
 echo "List of files that have been modified by the Merge Request AND"
diff --git a/ci-scripts/reportBuildLocally.sh b/ci-scripts/reportBuildLocally.sh
index 0a75ff25b7b..44d200c3b64 100755
--- a/ci-scripts/reportBuildLocally.sh
+++ b/ci-scripts/reportBuildLocally.sh
@@ -53,7 +53,7 @@ function details_table {
     echo "        <th>Message</th>" >> $3
     echo "      </tr>" >> $3
 
-    LIST_MESSAGES=`egrep "error:|warning:" $2 | egrep -v "jobserver unavailable|Clock skew detected.|flexran.proto"`
+    LIST_MESSAGES=`egrep "error:|warning:" $2 | egrep -v "jobserver unavailable|Clock skew detected.|flexran.proto|disabling jobserver mode"`
     COMPLETE_MESSAGE="start"
     for MESSAGE in $LIST_MESSAGES
     do
@@ -146,7 +146,7 @@ function summary_table_row {
         else
             echo "        <td bgcolor = \"red\" >$NB_ERRORS</th>" >> ./build_results.html
         fi
-        NB_WARNINGS=`egrep "warning:" $2 | egrep -v "jobserver unavailable|Clock skew detected.|flexran.proto" | egrep -c "warning:"`
+        NB_WARNINGS=`egrep "warning:" $2 | egrep -v "jobserver unavailable|Clock skew detected.|flexran.proto|disabling jobserver mode" | egrep -c "warning:"`
         if [ $NB_WARNINGS -eq 0 ]
         then
             echo "        <td bgcolor = \"green\" >$NB_WARNINGS</th>" >> ./build_results.html
diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai
index 9a5d5f370c4..20d965c71cb 100755
--- a/cmake_targets/build_oai
+++ b/cmake_targets/build_oai
@@ -406,7 +406,7 @@ function main() {
             shift 1;;
         -k | --skip-shared-libraries)
             SKIP_SHARED_LIB_FLAG="True"
-            echo_info "Skipping build of shared libraries, rfsimulator, basicsimulator and transport protocol libraries"
+            echo_info "Skipping build of shared libraries, rfsimulator and transport protocol libraries"
             shift;;
     --ninja)
         CMAKE_CMD="$CMAKE_CMD -GNinja"
@@ -896,7 +896,7 @@ function main() {
               $build_dir rfsimulator \
               librfsimulator.so $dbin/librfsimulator.so.$REL
 
-          echo_info "Compiling basicsimulator"
+          echo_info "Compiling tcp_bridge_oai"
           compilations \
               $build_dir tcp_bridge_oai \
               libtcp_bridge_oai.so $dbin/libtcp_bridge_oai.so.$REL
diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper
index 6e5a0b85e38..5a59b9a8cc4 100755
--- a/cmake_targets/tools/build_helper
+++ b/cmake_targets/tools/build_helper
@@ -169,7 +169,7 @@ check_warnings() {
   #we look for 'warning:' in the compilation log file
   #this is how gcc starts a warning
   #this is not perfect, we may get false positive
-  warning_count=`grep "warning:" "$1"|wc -l`
+  warning_count=`grep "warning:" "$1" | egrep -v "jobserver unavailable|disabling jobserver mode" | wc -l`
   if [ $warning_count -gt 0 ]; then
     echo_error "WARNING: $warning_count warnings. See $1"
   fi
-- 
GitLab