From 86ce576a454ebf64024a4f25fbaf37d4286c2b13 Mon Sep 17 00:00:00 2001 From: Tom Reynolds Date: Mon, 10 Nov 2014 09:39:19 +0100 Subject: [PATCH] include more info in coverity build "description" --- mk/linux/coverity-scan.sh | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/mk/linux/coverity-scan.sh b/mk/linux/coverity-scan.sh index bd0f31fd..2df3f862 100755 --- a/mk/linux/coverity-scan.sh +++ b/mk/linux/coverity-scan.sh @@ -32,6 +32,9 @@ PROJECT=MegaGlest # E-Mail address of registered Coverity Scan user with project access # EMAIL=x +# Where to store the data gathered by the Coverity Scan Build Tool +BUILDTOOL=cov-int + # read in config settings if [ ! -f ${CURRENTDIR}/.coverity-scan ] ; then echo "-----------------------------------------" @@ -44,24 +47,17 @@ fi # echo "Read config values: TOKEN [$TOKEN] EMAIL [$EMAIL] COVERITY_ANALYSIS_ROOT [$COVERITY_ANALYSIS_ROOT] NUMCORES [${NUMCORES}]" # exit 1 +GITBRANCH=$(git rev-parse --abbrev-ref HEAD | tr '/' '_') +GITVERSION_SHA1=$(git log -1 --format=%h) +GITVERSION_REV=$(git rev-list HEAD --count) +VERSION=${GITBRANCH}.${GITVERSION_REV}.${GITVERSION_SHA1} + # Included from shared functions detect_system -computername=$(hostname) -#DESCRIPTION=${distribution}-${release}-${architecture}_${computername} -DESCRIPTION=${distribution}-${architecture}_${computername} - -# Where to store the data gathered by the Coverity Scan Build Tool -BUILDTOOL=cov-int - -# ------------------------------------------------------------------------------ - -GITVERSION_SHA1=$(git log -1 --format=%h) -GITVERSION_REV=$(git rev-list HEAD --count) - -VERSION=${GITVERSION_REV}.${GITVERSION_SHA1} -FILENAME=${PROJECT}_${DESCRIPTION}_${VERSION} - +#DESCRIPTION=${distribution}-${release}-${architecture}_${hostname} +DESCRIPTION=${GITBRANCH}.${GITVERSION_SHA1}.${distribution}-${architecture}.${hostname} +FILENAME=${PROJECT}.${DESCRIPTION} # echo "FILENAME = [${FILENAME}]" # exit 1 @@ -105,3 +101,6 @@ else rm -rf ${BUILDTOOL}/ fi +# This currently fails to detect the following error situation, as reported in the HTML of the HTTP response (to the upload request): +# ERROR: Too many build submitted. Wait for few days before submitting next build: Refer build frequency at https://scan.coverity.com/faq#frequency +