projects
/
lttng-ci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #44 from frdeso/lava_fuzzing_remove_coredump
[lttng-ci.git]
/
scripts
/
common
/
coverity.sh
diff --git
a/scripts/common/coverity.sh
b/scripts/common/coverity.sh
index 35352cffa63f86a25495e16bfb0cc802d466a06d..c0476c28a0f326e7c4737679edc0a8212938d193 100755
(executable)
--- a/
scripts/common/coverity.sh
+++ b/
scripts/common/coverity.sh
@@
-52,27
+52,38
@@
export TMPDIR
case "$COVERITY_SCAN_PROJECT_NAME" in
babeltrace)
CONF_OPTS="--enable-python-bindings --enable-python-bindings-doc"
case "$COVERITY_SCAN_PROJECT_NAME" in
babeltrace)
CONF_OPTS="--enable-python-bindings --enable-python-bindings-doc"
+ BUILD_TYPE="autotools"
;;
liburcu)
CONF_OPTS=""
;;
liburcu)
CONF_OPTS=""
+ BUILD_TYPE="autotools"
;;
lttng-modules)
CONF_OPTS=""
;;
lttng-modules)
CONF_OPTS=""
+ BUILD_TYPE="autotools"
;;
lttng-tools)
CONF_OPTS=""
;;
lttng-tools)
CONF_OPTS=""
+ BUILD_TYPE="autotools"
;;
lttng-ust)
CONF_OPTS="--enable-java-agent-all --enable-python-agent"
;;
lttng-ust)
CONF_OPTS="--enable-java-agent-all --enable-python-agent"
+ BUILD_TYPE="autotools"
export CLASSPATH="/usr/share/java/log4j-1.2.jar"
;;
export CLASSPATH="/usr/share/java/log4j-1.2.jar"
;;
-lttng-scope)
+lttng-scope
|ctf-java|libdelorean-java|jabberwocky
)
CONF_OPTS=""
CONF_OPTS=""
+ BUILD_TYPE="maven"
MVN_BIN="$HOME/tools/hudson.tasks.Maven_MavenInstallation/default/bin/mvn"
;;
MVN_BIN="$HOME/tools/hudson.tasks.Maven_MavenInstallation/default/bin/mvn"
;;
+linux-rseq)
+ CONF_OPTS=""
+ BUILD_TYPE="linux-rseq"
+ ;;
*)
echo "Generic project, no configure options."
CONF_OPTS=""
*)
echo "Generic project, no configure options."
CONF_OPTS=""
+ BUILD_TYPE="autotools"
;;
esac
;;
esac
@@
-145,17
+156,10
@@
cd "$SRCDIR"
COVERITY_SCAN_VERSION=$(git describe --always | sed 's|-|.|g')
COVERITY_SCAN_VERSION=$(git describe --always | sed 's|-|.|g')
-# Prepare build dir for autotools based projects
-if [ -f "./bootstrap" ]; then
- ./bootstrap
- ./configure $CONF_OPTS
-fi
-
# Build
echo -e "\033[33;1mRunning Coverity Scan Analysis Tool...\033[0m"
# Build
echo -e "\033[33;1mRunning Coverity Scan Analysis Tool...\033[0m"
-case "$COVERITY_SCAN_PROJECT_NAME" in
-lttng-scope)
- export
+case "$BUILD_TYPE" in
+maven)
cov-configure --java
cov-build --dir "$RESULTS_DIR" $COVERITY_SCAN_BUILD_OPTIONS "$MVN_BIN" \
-s "$MVN_SETTINGS" \
cov-configure --java
cov-build --dir "$RESULTS_DIR" $COVERITY_SCAN_BUILD_OPTIONS "$MVN_BIN" \
-s "$MVN_SETTINGS" \
@@
-166,9
+170,23
@@
lttng-scope)
-DskipTests \
clean verify
;;
-DskipTests \
clean verify
;;
-*)
+autotools)
+ # Prepare build dir for autotools based projects
+ if [ -f "./bootstrap" ]; then
+ ./bootstrap
+ ./configure $CONF_OPTS
+ fi
+
cov-build --dir "$RESULTS_DIR" $COVERITY_SCAN_BUILD_OPTIONS make -j"$NPROC" V=1
;;
cov-build --dir "$RESULTS_DIR" $COVERITY_SCAN_BUILD_OPTIONS make -j"$NPROC" V=1
;;
+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
+ ;;
+*)
+ echo "Unsupported build type: $BUILD_TYPE"
+ exit 1
+ ;;
esac
esac
@@
-195,7
+213,7
@@
response=$(curl \
"$UPLOAD_URL")
set -x
status_code=$(echo "$response" | sed -n '$p')
"$UPLOAD_URL")
set -x
status_code=$(echo "$response" | sed -n '$p')
-if [ "$
status_code" == "201
" ]; then
+if [ "$
{status_code:0:1}" == "2
" ]; then
echo -e "\033[33;1mCoverity Scan upload successful.\033[0m"
else
TEXT=$(echo "$response" | sed '$d')
echo -e "\033[33;1mCoverity Scan upload successful.\033[0m"
else
TEXT=$(echo "$response" | sed '$d')
This page took
0.025609 seconds
and
4
git commands to generate.