From nobody Wed Nov 5 15:40:38 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1497369381628823.8842210708607; Tue, 13 Jun 2017 08:56:21 -0700 (PDT) Received: from localhost ([::1]:43992 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dKoB2-0007C4-9L for importer@patchew.org; Tue, 13 Jun 2017 11:56:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36092) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dKo9h-000601-BA for qemu-devel@nongnu.org; Tue, 13 Jun 2017 11:54:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dKo9g-0004wa-4c for qemu-devel@nongnu.org; Tue, 13 Jun 2017 11:54:57 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:37259) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dKo9f-0004uE-SZ for qemu-devel@nongnu.org; Tue, 13 Jun 2017 11:54:56 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.84_2) (envelope-from ) id 1dKo9d-0001As-8t; Tue, 13 Jun 2017 16:54:53 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Tue, 13 Jun 2017 16:54:50 +0100 Message-Id: <1497369290-20401-4-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497369290-20401-1-git-send-email-peter.maydell@linaro.org> References: <1497369290-20401-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PATCH 3/3] travis: Add config to do a Coverity Scan upload X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Markus Armbruster , patches@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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/add= ons/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 --- .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=3D"" before_script: - ./configure ${CONFIG} --extra-cflags=3D"-g3 -O0 -fsanitize=3Dthr= ead -fuse-ld=3Dgold" || 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 scanne= d. + # If we needed to apply a limit at the Travis end, the simplest approa= ch + # 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 periodic= ally. + # We run on the trusty Travis hosts so that there's a wider set of + # dependencies satisfied to improve coverage. + - dist: trusty + env: + - COVERITY=3D1 + - COVERITY_BUILD_CMD=3D"make -j3" + - COVERITY_EMAIL=3Dpeter.maydell@linaro.org + # This 'secure' setting sets COVERITY_TOKEN=3D + # and was created with travis encrypt -r qemu/qemu COVERITY_TOKEN= =3D... + - secure: "D3E6E5bacui53fYBQrx0wQr8ZTvo6VIBPKfg0QHj2uwa6OPFkUlcMr/= EHWvdbZNAa4Q1bv1vhlED5OPRfPmQYzxQNT4SAxDZeuZnikgIymfqQXNOjKw4kRUDO9P42QanyF= d+EAu2JDVClAeJPgBpa/ns4CNrGDK+Q3coGndCP8o=3D" + before_script: + - if [ "$TRAVIS_PULL_REQUEST" =3D "true" ]; then echo "Skipping Co= verity (pullreq)"; exit 0; fi + - if [ "$TRAVIS_BRANCH" !=3D "master" ]; then echo "Skipping Cover= ity (wrong branch)"; exit 0; fi + script: + - ./scripts/run-coverity-scan --=20 2.7.4