From 6c4d2d3ea208bfd0d38d7c5071ea0b398e71c5c8 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Fri, 28 Oct 2016 14:45:55 +0200 Subject: [PATCH 1/4] coverity: fix download URL --- script/coverity.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/script/coverity.sh b/script/coverity.sh index 7fe9eb4c7..229a9c370 100755 --- a/script/coverity.sh +++ b/script/coverity.sh @@ -12,12 +12,11 @@ then exit 0 fi -COV_VERSION=6.6.1 case $(uname -m) in i?86) BITS=32 ;; amd64|x86_64) BITS=64 ;; esac -SCAN_TOOL=https://scan.coverity.com/download/linux-${BITS} +SCAN_TOOL=https://scan.coverity.com/download/cxx/linux${BITS} TOOL_BASE=$(pwd)/_coverity-scan # Install coverity tools From 561276eed6be2c763af23ae3b034a1f194b03d0b Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Fri, 28 Oct 2016 14:48:30 +0200 Subject: [PATCH 2/4] coverity: only analyze the master branch of the main repository We used to only execute Coverity analysis on the 'development' branch before commit 998f001 (Refine build limitation, 2014-01-15), which refined Coverity build limitations. While we do not really use the 'development' branch anymore, it does still make sense to only analyze a single branch, as otherwise Coverity might get confused. Re-establish the restriction such that we only analyze libgit2's 'master' branch. Also fix the message announcing why we do not actually analyze a certain build. --- script/coverity.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/script/coverity.sh b/script/coverity.sh index 229a9c370..9021b9e7c 100755 --- a/script/coverity.sh +++ b/script/coverity.sh @@ -5,10 +5,10 @@ set -e [ -z "$COVERITY_TOKEN" ] && echo "Need to set a coverity token" && exit 1 # Only run this on our branches -echo "Pull request: $TRAVIS_PULL_REQUEST | Slug: $TRAVIS_REPO_SLUG" -if [ "$TRAVIS_PULL_REQUEST" != "false" -o "$TRAVIS_REPO_SLUG" != "libgit2/libgit2" ]; +echo "Branch: $TRAVIS_BRANCH | Pull request: $TRAVIS_PULL_REQUEST | Slug: $TRAVIS_REPO_SLUG" +if [ "$TRAVIS_BRANCH" != "master" -o "$TRAVIS_PULL_REQUEST" != "false" -o "$TRAVIS_REPO_SLUG" != "libgit2/libgit2" ]; then - echo "Only analyzing 'development' on the main repo." + echo "Only analyzing the 'master' brach of the main repository." exit 0 fi From 18c18e3df86850f794dd2fe562ea03a2beab244e Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Mon, 31 Oct 2016 15:55:46 +0100 Subject: [PATCH 3/4] coverity: check for Coverity token only if necessary When running a Coverity build, we have to provide an authentication token in order to proof that we are actually allowed to run analysis in the name of a certain project. As this token should be secret, it is only set on the main repository, so when we were requested to run the Coverity script on another repository we do error out. But in fact we do also error out if the Coverity analysis should _not_ be run if there is no authentication token provided. Fix the issue by only checking for the authentication token after determining if analysis is indeed requested. --- script/coverity.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/script/coverity.sh b/script/coverity.sh index 9021b9e7c..5fe16c031 100755 --- a/script/coverity.sh +++ b/script/coverity.sh @@ -1,9 +1,6 @@ #!/bin/bash set -e -# Environment check -[ -z "$COVERITY_TOKEN" ] && echo "Need to set a coverity token" && exit 1 - # Only run this on our branches echo "Branch: $TRAVIS_BRANCH | Pull request: $TRAVIS_PULL_REQUEST | Slug: $TRAVIS_REPO_SLUG" if [ "$TRAVIS_BRANCH" != "master" -o "$TRAVIS_PULL_REQUEST" != "false" -o "$TRAVIS_REPO_SLUG" != "libgit2/libgit2" ]; @@ -12,6 +9,9 @@ then exit 0 fi +# Environment check +[ -z "$COVERITY_TOKEN" ] && echo "Need to set a coverity token" && exit 1 + case $(uname -m) in i?86) BITS=32 ;; amd64|x86_64) BITS=64 ;; From 0334bf4b24401c73cb9c9e2211bc4858e61b5934 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Fri, 28 Oct 2016 14:57:54 +0200 Subject: [PATCH 4/4] travis: do not allow valgrind failures Our valgrind jobs haven't been failing for several builds by now. This indicates that our tests are sufficiently stable when running under valgrind. As such, any failures reported by valgrind become interesting to us and shouldn't be ignored when causing a build to fail. Remove the valgrind job from the list of allowed failures. --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index bfc0fac48..af38252ce 100644 --- a/.travis.yml +++ b/.travis.yml @@ -47,9 +47,6 @@ matrix: os: linux allow_failures: - env: COVERITY=1 - - env: - - VALGRIND=1 - OPTIONS="-DBUILD_CLAR=ON -DBUILD_EXAMPLES=OFF -DDEBUG_POOL=ON -DCMAKE_BUILD_TYPE=Debug" install: - if [ "$TRAVIS_OS_NAME" = "osx" ]; then ./script/install-deps-${TRAVIS_OS_NAME}.sh; fi