summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vincent.sanders@collabora.co.uk>2013-11-16 12:55:03 (GMT)
committer Vincent Sanders <vincent.sanders@collabora.co.uk>2013-11-16 12:55:03 (GMT)
commit37a7809308f3a2f7dac2ce6feab1aa9c1113fdc8 (patch)
tree7d3785dc4d49f1236c226013e99a82a1dbd47bac
parent976aa3abca16a4d40cac238cea1bebe4218978cc (diff)
downloadbuildsystem-37a7809308f3a2f7dac2ce6feab1aa9c1113fdc8.tar.gz
buildsystem-37a7809308f3a2f7dac2ce6feab1aa9c1113fdc8.tar.bz2
fix coverity to pass project name and verify required parameters are set
-rwxr-xr-xcitools/jenkins-build.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/citools/jenkins-build.sh b/citools/jenkins-build.sh
index 3ec0de6..4ea0a8c 100755
--- a/citools/jenkins-build.sh
+++ b/citools/jenkins-build.sh
@@ -162,14 +162,23 @@ elif [ "x${TARGET}" = "x${TARGET_STATIC}" ]; then
elif [ "x${TARGET}" = "x${TARGET_COVERITY}" ]; then
# coverity build
+ # Check thses are set
+ #
+ # COVERITY_PROJECT
# COVERITY_TOKEN
# COVERITY_USER
# COVERITY_PREFIX
+ if [ -n "${COVERITY_PROJECT}" -o -n "${COVERITY_TOKEN}" -o -n "${COVERITY_USER}" -o -n "${COVERITY_PREFIX}" ]; then
+ echo "Coverity parameters not set"
+ exit 1
+ fi
+
# Coverity tools location
COVERITY_PREFIX=${COVERITY_PREFIX:-/opt/coverity/cov-analysis-linux64-6.6.1}
COVERITY_VERSION=$(git rev-parse HEAD)
+
export PATH=${PATH}:${COVERITY_PREFIX}/bin
# cleanup before we start
@@ -181,7 +190,7 @@ elif [ "x${TARGET}" = "x${TARGET_COVERITY}" ]; then
gzip -9 coverity-scan.tar
- curl --form "project=NetSurf" --form "token=${COVERITY_TOKEN}" --form "email=${COVERITY_USER}" --form "file=@coverity-scan.tar.gz" --form "version=${COVERITY_VERSION}" --form "description=Git Head build" http://scan5.coverity.com/cgi-bin/upload.py
+ curl --form "project=${COVERITY_PROJECT}" --form "token=${COVERITY_TOKEN}" --form "email=${COVERITY_USER}" --form "file=@coverity-scan.tar.gz" --form "version=${COVERITY_VERSION}" --form "description=Git Head build" http://scan5.coverity.com/cgi-bin/upload.py
else
# Normal build