From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: patches@linaro.org, "Alex Bennée" <alex.bennee@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>
Subject: [Qemu-devel] [PATCH 3/3] travis: Add config to do a Coverity Scan upload
Date: Tue, 13 Jun 2017 16:54:50 +0100 [thread overview]
Message-ID: <1497369290-20401-4-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1497369290-20401-1-git-send-email-peter.maydell@linaro.org>
Add config to travis to do a Coverity Scan build and upload, using
the new run-coverity-scan script.
There is an official integration between Travis and Coverity Scan:
https://github.com/travis-ci/travis-build/blob/master/lib/travis/build/addons/coverity_scan.rb
which slurps values out of the .travis.yml and downloads a build
script from Coverity which does the bulk of the work:
https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh
However we choose to roll our own since this seems less
confusing and also allows us to include debug features
(notably the ability to do a "dry run" test which doesn't
actually upload anything).
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
.travis.yml | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/.travis.yml b/.travis.yml
index 26dabb6..d772a4a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -210,3 +210,27 @@ matrix:
- TEST_CMD=""
before_script:
- ./configure ${CONFIG} --extra-cflags="-g3 -O0 -fsanitize=thread -fuse-ld=gold" || cat config.log
+ # Build and upload to Coverity Scan.
+ # We do not impose any rate limiting here, but instead rely on the
+ # limiting done by the coverity servers, which for a project of QEMU's
+ # size means one build a day. The run-coverity-scan script will exit
+ # early if the limiter does not permit a new upload, so the effect will
+ # be that the first build (only) in each 24 hour period will be scanned.
+ # If we needed to apply a limit at the Travis end, the simplest approach
+ # would be to run the scan only if the branch was 'coverity-scan', and
+ # use a cron job to push master to the 'coverity-scan' branch periodically.
+ # We run on the trusty Travis hosts so that there's a wider set of
+ # dependencies satisfied to improve coverage.
+ - dist: trusty
+ env:
+ - COVERITY=1
+ - COVERITY_BUILD_CMD="make -j3"
+ - COVERITY_EMAIL=peter.maydell@linaro.org
+ # This 'secure' setting sets COVERITY_TOKEN=<secret token>
+ # and was created with travis encrypt -r qemu/qemu COVERITY_TOKEN=...
+ - secure: "D3E6E5bacui53fYBQrx0wQr8ZTvo6VIBPKfg0QHj2uwa6OPFkUlcMr/EHWvdbZNAa4Q1bv1vhlED5OPRfPmQYzxQNT4SAxDZeuZnikgIymfqQXNOjKw4kRUDO9P42QanyFd+EAu2JDVClAeJPgBpa/ns4CNrGDK+Q3coGndCP8o="
+ before_script:
+ - if [ "$TRAVIS_PULL_REQUEST" = "true" ]; then echo "Skipping Coverity (pullreq)"; exit 0; fi
+ - if [ "$TRAVIS_BRANCH" != "master" ]; then echo "Skipping Coverity (wrong branch)"; exit 0; fi
+ script:
+ - ./scripts/run-coverity-scan
--
2.7.4
next prev parent reply other threads:[~2017-06-13 15:54 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-13 15:54 [Qemu-devel] [PATCH 0/3] Automate coverity scan uploads via Travis Peter Maydell
2017-06-13 15:54 ` [Qemu-devel] [PATCH 1/3] travis: install more library dependencies Peter Maydell
2017-06-14 3:52 ` Philippe Mathieu-Daudé
2017-06-14 15:07 ` Paolo Bonzini
2017-06-14 15:37 ` Philippe Mathieu-Daudé
2017-06-14 16:49 ` Paolo Bonzini
2017-06-14 17:04 ` Peter Maydell
2017-06-14 17:20 ` Paolo Bonzini
2017-06-29 14:37 ` Peter Maydell
2017-06-14 14:45 ` Alex Bennée
2017-06-14 15:15 ` Daniel P. Berrange
2017-06-14 15:25 ` Philippe Mathieu-Daudé
2017-06-13 15:54 ` [Qemu-devel] [PATCH 2/3] scripts/run-coverity-scan: Script to run Coverity Scan build Peter Maydell
2017-06-14 15:01 ` Alex Bennée
2017-06-29 16:12 ` Eric Blake
2017-06-29 16:15 ` Peter Maydell
2017-06-13 15:54 ` Peter Maydell [this message]
2017-06-14 15:14 ` [Qemu-devel] [PATCH 3/3] travis: Add config to do a Coverity Scan upload Alex Bennée
2017-06-14 15:46 ` Peter Maydell
2017-06-13 16:15 ` [Qemu-devel] [PATCH 0/3] Automate coverity scan uploads via Travis no-reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1497369290-20401-4-git-send-email-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=armbru@redhat.com \
--cc=patches@linaro.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).