jjb: fix coverity on gcc >= 7
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 16 Apr 2019 14:51:19 +0000 (10:51 -0400)
committerMichael Jeanson <mjeanson@efficios.com>
Tue, 16 Apr 2019 14:51:19 +0000 (10:51 -0400)
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
jobs/lttng-modules.yaml
jobs/lttng-tools.yaml
scripts/common/coverity.sh

index 5867d3058fdb60c7c3d13a75fdd879c787a0d288..c18c01a9df749552b583627273bb9461675129d4 100644 (file)
 
     builders:
       - shell: |
-         git clone --depth=1 -b v4.10 --reference $HOME/gitcache/linux-stable.git/ git://git-mirror.internal.efficios.com/kernel/stable/linux-stable.git src/linux
+         git clone --depth=1 -b v4.20 --reference $HOME/gitcache/linux-stable.git/ git://git-mirror.internal.efficios.com/kernel/stable/linux-stable.git src/linux
          cd src/linux
          make defconfig
          sed -i "s/# CONFIG_KALLSYMS_ALL is not set/CONFIG_KALLSYMS_ALL=y/g" .config
       - shell:
          !include-raw-escape: scripts/common/coverity.sh
 
+    publishers:
+      - archive:
+          artifacts: 'analysis-results.tgz,cov-int/**'
+          allow-empty: false
+      - workspace-cleanup
+
 - job-template:
     name: lttng-modules_{mversion}_cppcheck
     defaults: lttng-modules
index 6084266ba0312bf445e9c349e5303e81444fa5df..3e4d895a67f077f6c4c9d60b4e4487b1ae8fe915 100644 (file)
           !include-raw-escape: scripts/common/coverity.sh
 
     publishers:
+      - archive:
+          artifacts: 'analysis-results.tgz,cov-int/**'
+          allow-empty: false
       - workspace-cleanup
 
 # TODO
index c0476c28a0f326e7c4737679edc0a8212938d193..7b06f554647af35fc1f5e3163199f7cad6102d1c 100755 (executable)
@@ -112,6 +112,28 @@ if [ -d "$WORKSPACE/src/linux" ]; then
        export KERNELDIR="$WORKSPACE/src/linux"
 fi
 
+# Hack to get coverity with gcc >= 7
+#
+# We have to define the _Float* types as those are not defined by coverity and as result
+# the codes linking agains those (pretty much anything linking against stdlib.h and math.h)
+# won't be covered.
+echo "
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define _Float128 long double
+#define _Float64x long double
+#define _Float64 double
+#define _Float32x double
+#define _Float32 float
+
+#ifdef __cplusplus
+}
+#endif" >> /tmp/coverity.h
+
+export CPPFLAGS="-include /tmp/coverity.h ${CPPFLAGS:-}"
+
 
 # Verify upload is permitted
 set +x
This page took 0.02545 seconds and 4 git commands to generate.