summaryrefslogtreecommitdiffstats
path: root/build-gluster-org/scripts
diff options
context:
space:
mode:
authorNigel Babu <nigelb@redhat.com>2018-07-19 15:43:17 +0530
committerNigel Babu <nigelb@redhat.com>2018-08-06 13:43:41 +0530
commit045ef8b9807f51cca22d0a43fc8026f987504a5e (patch)
treecf4e8d0d244d1adff24a5b4ccc04e5da40bab761 /build-gluster-org/scripts
parent5730b82fe0980811c1f25eee126bcf7030f0c3aa (diff)
Coverity nightly job for Gluster
Change-Id: Idc81fd4612a8746900875d1b4f6adba97d0a1373
Diffstat (limited to 'build-gluster-org/scripts')
-rw-r--r--build-gluster-org/scripts/coverity.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/build-gluster-org/scripts/coverity.sh b/build-gluster-org/scripts/coverity.sh
new file mode 100644
index 0000000..6b72191
--- /dev/null
+++ b/build-gluster-org/scripts/coverity.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+./autogen.sh
+./configure --enable-gnfs --enable-debug --silent
+nproc=$(getconf _NPROCESSORS_ONLN)
+
+# This is a hack to get Coverity to work with GCC8, all of them may not be
+# needed in EL7 at the moment, but if someone wants to do this on Fedora, these
+# are the steps
+cat <<EOF >> site.h
+#ifndef __COVERITY_GCC_VERSION_AT_LEAST
+ #define __COVERITY_GCC_VERSION_AT_LEAST(x, y) 0
+ #define FAKE__COVERITY_GCC_VERSION_AT_LEAST__
+#endif /* __COVERITY_GCC_VERSION_AT_LEAST */
+#ifdef __x86_64__
+ #if __COVERITY_GCC_VERSION_AT_LEAST(7, 0)
+ typedef float _Float128 __attribute__((__vector_size__(128)));
+ typedef float _Float32 __attribute__((__vector_size__(32)));
+ typedef float _Float32x __attribute__((__vector_size__(32)));
+ typedef float _Float64 __attribute__((__vector_size__(64)));
+ typedef float _Float64x __attribute__((__vector_size__(64)));
+ #endif
+#endif
+EOF
+/opt/cov-analysis-linux64-2017.07/bin/cov-build --dir cov-int make -j ${nproc};
+tar czvf glusterfs.tgz cov-int
+BUILD_DATE=$(date "+%Y-%m-%d")
+BUILD_VERSION=$(git log -n1 --pretty='%h')
+curl --form token="${COVERITY_TOKEN}" \
+ --form email="${COVERITY_EMAIL}" \
+ --form file=@glusterfs.tgz \
+ --form version="${BUILD_DATE}-${BUILD_VERSION}" \
+ --form description="Nightly build on ${BUILD_DATE}" \
+ https://scan.coverity.com/builds?project=gluster%2Fglusterfs