jjb/ansible: Test lttng-ust-java-agents on slesbuilds
[lttng-ci.git] / scripts / common / coverity.sh
index a757a174de880a968c715074a84dfc3a7bc83576..21e76aba68f0312303cacf1867b732601d33c7b0 100755 (executable)
@@ -1,20 +1,8 @@
 #!/bin/bash
 #
-# Copyright (C) 2023 Michael Jeanson <mjeanson@efficios.com>
-# Copyright (C) 2015 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# SPDX-FileCopyrightText: 2015 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
+# SPDX-FileCopyrightText: 2023 Michael Jeanson <mjeanson@efficios.com>
+# SPDX-License-Identifier: GPL-2.0-or-later
 
 set -exu
 
@@ -46,7 +34,8 @@ TMPDIR="$WORKSPACE/tmp"
 
 NPROC=$(nproc)
 PLATFORM=$(uname)
-export CFLAGS="-O0 -g -DDEBUG"
+export CFLAGS="-O0 -g"
+export CXXFLAGS="-O0 -g"
 
 # Cache the tool installer in the home directory since we delete the workspace
 # on each build
@@ -89,11 +78,6 @@ lttng-ust)
     BUILD_TYPE="autotools"
     export CLASSPATH="/usr/share/java/log4j-api.jar:/usr/share/java/log4j-core.jar:/usr/share/java/log4j-1.2.jar"
     ;;
-lttng-scope|ctf-java|libdelorean-java|jabberwocky)
-    CONF_OPTS=()
-    BUILD_TYPE="maven"
-    MVN_BIN="$HOME/tools/hudson.tasks.Maven_MavenInstallation/default/bin/mvn"
-    ;;
 *)
     echo "Generic project, no configure options."
     CONF_OPTS=()
@@ -131,7 +115,13 @@ fi
 if [ ! -d "$TOOL_BASE" ]; then
   echo -e "\033[33;1mDownloading Coverity Scan Analysis Tool...\033[0m"
   set +x
-  curl --fail --remote-time --continue-at - --form project="$COVERITY_SCAN_PROJECT_NAME" --form token="$COVERITY_SCAN_TOKEN" --output "$TOOL_ARCHIVE" --time-cond "$TOOL_ARCHIVE" "$TOOL_URL"
+  curl --fail \
+       --location \
+       --remote-time \
+       --form project="$COVERITY_SCAN_PROJECT_NAME" \
+       --form token="$COVERITY_SCAN_TOKEN" \
+       --output "$TOOL_ARCHIVE" \
+       "$TOOL_URL" || rm -f "$TOOL_ARCHIVE"
   set -x
 
   # Extract Coverity Scan Analysis Tool
@@ -188,9 +178,8 @@ tar czf $RESULTS_ARCHIVE $RESULTS_DIR_NAME
 
 # Upload results
 echo -e "\033[33;1mUploading Coverity Scan Analysis results...\033[0m"
-set +x
 response=$(curl \
-  --silent --write-out "\n%{http_code}\n" \
+  --write-out "\n%{http_code}\n" \
   --form project="$COVERITY_SCAN_PROJECT_NAME" \
   --form token="$COVERITY_SCAN_TOKEN" \
   --form email="$COVERITY_SCAN_NOTIFICATION_EMAIL" \
@@ -198,7 +187,6 @@ response=$(curl \
   --form version="$COVERITY_SCAN_VERSION" \
   --form description="$COVERITY_SCAN_DESCRIPTION" \
   "$UPLOAD_URL")
-set -x
 status_code=$(echo "$response" | sed -n '$p')
 if [ "${status_code:0:1}" == "2" ]; then
   echo -e "\033[33;1mCoverity Scan upload successful.\033[0m"
This page took 0.023031 seconds and 4 git commands to generate.