X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;ds=inline;f=scripts%2Fcommon%2Fcoverity.sh;h=a88a2c7fde3f62cbf0566c675c8de2be4595ee8c;hb=925d7893fbb737bc2547b3eb2d893535a713004e;hp=7b06f554647af35fc1f5e3163199f7cad6102d1c;hpb=96e8f697eeac55f745c784aed7e0179bf2d26ff2;p=lttng-ci.git diff --git a/scripts/common/coverity.sh b/scripts/common/coverity.sh index 7b06f55..a88a2c7 100755 --- a/scripts/common/coverity.sh +++ b/scripts/common/coverity.sh @@ -112,32 +112,11 @@ 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 +# Added "--insecure" because Coverity can't be bothered to properly install SSL certificate chains set +x -AUTH_RES=$(curl -s --form project="$COVERITY_SCAN_PROJECT_NAME" --form token="$COVERITY_SCAN_TOKEN" $SCAN_URL/api/upload_permitted) +AUTH_RES=$(curl -s --insecure --form project="$COVERITY_SCAN_PROJECT_NAME" --form token="$COVERITY_SCAN_TOKEN" $SCAN_URL/api/upload_permitted) set -x if [ "$AUTH_RES" = "Access denied" ]; then echo -e "\033[33;1mCoverity Scan API access denied. Check COVERITY_SCAN_PROJECT_NAME and COVERITY_SCAN_TOKEN.\033[0m" @@ -159,7 +138,7 @@ if [ ! -d "$TOOL_BASE" ]; then if [ ! -e "$TOOL_ARCHIVE" ]; then echo -e "\033[33;1mDownloading Coverity Scan Analysis Tool...\033[0m" set +x - wget -nv -O "$TOOL_ARCHIVE" "$TOOL_URL" --post-data "project=$COVERITY_SCAN_PROJECT_NAME&token=$COVERITY_SCAN_TOKEN" + curl -s --insecure --form project="$COVERITY_SCAN_PROJECT_NAME" --form token="$COVERITY_SCAN_TOKEN" -o "$TOOL_ARCHIVE" "$TOOL_URL" set -x fi @@ -203,7 +182,8 @@ autotools) ;; linux-rseq) make defconfig - cov-build --dir "$RESULTS_DIR" $COVERITY_SCAN_BUILD_OPTIONS make -j"$NPROC" kernel/rseq.o kernel/cpu_opv.o V=1 + make -j"$NPROC" prepare + cov-build --dir "$RESULTS_DIR" $COVERITY_SCAN_BUILD_OPTIONS make -j"$NPROC" kernel/rseq.o kernel/cpu_opv.o V=1 KCPPFLAGS="$CPPFLAGS" ;; *) echo "Unsupported build type: $BUILD_TYPE" @@ -224,7 +204,7 @@ tar czf $RESULTS_ARCHIVE $RESULTS_DIR_NAME # Upload results echo -e "\033[33;1mUploading Coverity Scan Analysis results...\033[0m" set +x -response=$(curl \ +response=$(curl --insecure \ --silent --write-out "\n%{http_code}\n" \ --form project="$COVERITY_SCAN_PROJECT_NAME" \ --form token="$COVERITY_SCAN_TOKEN" \