Commit a65d09cb authored by Raphael Defosseux's avatar Raphael Defosseux

CI: adding support to build for coverity-scan

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent 28840df8
...@@ -58,6 +58,7 @@ CFLAGS_PROCESSOR_USER="" ...@@ -58,6 +58,7 @@ CFLAGS_PROCESSOR_USER=""
RUN_GROUP=0 RUN_GROUP=0
TEST_CASE_GROUP="" TEST_CASE_GROUP=""
BUILD_DOXYGEN=0 BUILD_DOXYGEN=0
BUILD_COVERITY_SCAN=0
T_TRACER="True" T_TRACER="True"
DISABLE_HARDWARE_DEPENDENCY="False" DISABLE_HARDWARE_DEPENDENCY="False"
CMAKE_BUILD_TYPE="" CMAKE_BUILD_TYPE=""
...@@ -128,6 +129,8 @@ Options ...@@ -128,6 +129,8 @@ Options
Manually Add CFLAGS of processor if they are not detected correctly by script. Only add these flags if you know your processor supports them. Example flags: -msse3 -msse4.1 -msse4.2 -mavx2 Manually Add CFLAGS of processor if they are not detected correctly by script. Only add these flags if you know your processor supports them. Example flags: -msse3 -msse4.1 -msse4.2 -mavx2
--build-doxygen --build-doxygen
Builds doxygen based documentation. Builds doxygen based documentation.
--build-coverity-scan
Builds Coverity-Scan objects for upload
--disable-deadline --disable-deadline
Disables deadline scheduler of Linux kernel (>=3.14.x). Disables deadline scheduler of Linux kernel (>=3.14.x).
--enable-deadline --enable-deadline
...@@ -277,6 +280,10 @@ function main() { ...@@ -277,6 +280,10 @@ function main() {
BUILD_DOXYGEN=1 BUILD_DOXYGEN=1
echo_info "Will build doxygen support" echo_info "Will build doxygen support"
shift;; shift;;
--build-coverity-scan)
BUILD_COVERITY_SCAN=1
echo_info "Will build Coverity-Scan objects for upload"
shift;;
--disable-deadline) --disable-deadline)
FORCE_DEADLINE_SCHEDULER_FLAG_USER="False" FORCE_DEADLINE_SCHEDULER_FLAG_USER="False"
echo_info "Disabling the usage of deadline scheduler" echo_info "Disabling the usage of deadline scheduler"
...@@ -307,7 +314,7 @@ function main() { ...@@ -307,7 +314,7 @@ function main() {
shift 1;; shift 1;;
--ue-timing) --ue-timing)
UE_TIMING_TRACE="True" UE_TIMING_TRACE="True"
x echo_info "Enabling UE timing trace" echo_info "Enabling UE timing trace"
shift 1;; shift 1;;
--uhd-images-dir) --uhd-images-dir)
UHD_IMAGES_DIR=$2 UHD_IMAGES_DIR=$2
...@@ -346,6 +353,19 @@ function main() { ...@@ -346,6 +353,19 @@ function main() {
esac esac
done done
#########################################################
# check if cov-build is installed
#########################################################
if [ "$BUILD_COVERITY_SCAN" == "1" ] ; then
echo_info "Checking cov-build is installed"
IS_INSTALLED=`which cov-build | grep -c cov-build || true`
if [ $IS_INSTALLED -eq 1 ] ; then
echo_info "Found cov-build"
else
echo_fatal "Did NOT find cov-build in PATH!"
fi
fi
CMAKE_CMD="$CMAKE_CMD .." CMAKE_CMD="$CMAKE_CMD .."
echo_info "CMAKE_CMD=$CMAKE_CMD" echo_info "CMAKE_CMD=$CMAKE_CMD"
######################################################### #########################################################
......
...@@ -177,10 +177,15 @@ compilations() { ...@@ -177,10 +177,15 @@ compilations() {
set +e set +e
{ {
rm -f $3 rm -f $3
if [ "$BUILD_COVERITY_SCAN" == "1" ]; then
COV_SCAN_PREFIX="cov-build --dir cov-int"
else
COV_SCAN_PREFIX=""
fi
if [ "$VERBOSE_COMPILE" == "1" ]; then if [ "$VERBOSE_COMPILE" == "1" ]; then
make -j`nproc` $2 VERBOSE=$VERBOSE_COMPILE $COV_SCAN_PREFIX make -j`nproc` $2 VERBOSE=$VERBOSE_COMPILE
else else
make -j`nproc` $2 $COV_SCAN_PREFIX make -j`nproc` $2
fi fi
} > $dlog/$2.$REL.txt 2>&1 } > $dlog/$2.$REL.txt 2>&1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment