jjb: remove -DDEBUG from coverity CFLAGS
[lttng-ci.git] / scripts / common / scan-build.sh
index 3782f4f32034c8118dd12e50b7999c31ebeef57a..478fff1f5045b7d37728ec324621e7bb12f709ea 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash -exu
+#!/bin/bash
 #
 # Copyright (C) 2015 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
 # Copyright (C) 2019 Michael Jeanson <mjeanson@efficios.com>
@@ -16,6 +16,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+set -exu
+
 # Required variables
 WORKSPACE=${WORKSPACE:-}
 
@@ -34,7 +36,8 @@ SRCDIR="$WORKSPACE/src/$PROJECT_NAME"
 TMPDIR="$WORKSPACE/tmp"
 
 NPROC=$(nproc)
-export CFLAGS="-O0 -g -DDEBUG"
+export CFLAGS="-O0 -g"
+export CXXFLAGS="-O0 -g"
 
 # Directory to archive the scan-build report
 SCAN_BUILD_ARCHIVE="${WORKSPACE}/scan-build-archive"
@@ -45,6 +48,10 @@ mkdir -p "$TMPDIR"
 
 export TMPDIR
 
+# Builds configured with '-Werror=missing-include-dirs' if this directory
+# doesn't exist
+mkdir -p "$DEPS_INC"
+
 # temp directory to store the scan-build report
 SCAN_BUILD_TMPDIR=$(mktemp -d)
 
@@ -71,11 +78,7 @@ lttng-tools)
 lttng-ust)
     CONF_OPTS="--enable-java-agent-all --enable-python-agent"
     BUILD_TYPE="autotools"
-    export CLASSPATH="/usr/share/java/log4j-1.2.jar"
-    ;;
-linux-rseq)
-    CONF_OPTS=""
-    BUILD_TYPE="linux-rseq"
+    export CLASSPATH="/usr/share/java/log4j-api.jar:/usr/share/java/log4j-core.jar:/usr/share/java/log4j-1.2.jar"
     ;;
 *)
     echo "Generic project, no configure options."
@@ -102,11 +105,6 @@ autotools)
 
     scan-build -k -o "${SCAN_BUILD_TMPDIR}" make -j"$NPROC" V=1
     ;;
-linux-rseq)
-    make defconfig
-    make -j"$NPROC" prepare
-    scan-build -k -o "${SCAN_BUILD_TMPDIR}" make -j"$NPROC" kernel/rseq.o kernel/do_on_cpu/core.o kernel/do_on_cpu/interpreter.o kernel/do_on_cpu/validate.o V=1
-    ;;
 *)
     echo "Unsupported build type: $BUILD_TYPE"
     exit 1
This page took 0.025154 seconds and 4 git commands to generate.