From patchwork Tue Jun 13 15:54:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 105378 Delivered-To: patches@linaro.org Received: by 10.140.91.77 with SMTP id y71csp476063qgd; Tue, 13 Jun 2017 08:54:54 -0700 (PDT) X-Received: by 10.25.38.139 with SMTP id m133mr152363lfm.127.1497369294224; Tue, 13 Jun 2017 08:54:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497369294; cv=none; d=google.com; s=arc-20160816; b=r9iGEOOAxAhx0k2GgAWIL2Ukg48eIyHvaBwfO2Z2ORWsANzJjjk7Gc/LjJVjtcqxUZ /0oURCo42gz2D39j0jJt2iJ6nrycjXESTQiUAnlAsZd7QXmuSiwyeJ4XpGre+cKBOgYh OIGmMdO2dcogQnn6NkTVZuSRQf5d5puYieaFiHrdbZKd7caTG0zZPWwI50Sd81tOPoSE Sn51mfdgiEANFkeeBS8o+AjugQGVHKxAxP3lQuwbWVjpzoSAtjGdDyPMmVpryv1yKcbp t9myfY02S++fYjmPG+8odj8SVgzaldJdsndV55StSIKHWHiJ0fNCNddReB03qytixD1w 3smA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=tDYrJsSec7utfTo+7Mz0PZej9hOYIKST0qKDRZ+VaVU=; b=nlLLfhHttP41c2ZYP5jqtlSClB9SHx87F7l0LQa7Y0UVc+ACdPehp5OrU9cxPU0dpF OCOxD63vG7xWzzUmN0aG/woxwcGkZBoRFgD75ODt4JMDhIQXUvQOlRCU1VbRE59Pabxz jkIbINLNFMvF5XxOI2fPH4LzOiDJS46gu8rcNUnthTw8RB7wk8xcPd7pBcNLFPTUiSQr n7A/GPnOvYfgjoDSgaRZBa1nWMAPuLHhlJI7VULlkMDZRt3VkAUQIX4PySDiDOVeX8Sx IfAEoHfpcVuMh3xD5CvA0W0fZU0kGYmGTUdmbCmLZl/gt/iHYxtjQFmf+5MdZJrTcoaZ YhAg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) smtp.mailfrom=pm215@archaic.org.uk; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by mx.google.com with ESMTPS id 17si198199ljh.4.2017.06.13.08.54.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Jun 2017 08:54:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) client-ip=2001:8b0:1d0::2; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) smtp.mailfrom=pm215@archaic.org.uk; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 Cc: patches@linaro.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Paolo Bonzini , Markus Armbruster Subject: [PATCH 3/3] travis: Add config to do a Coverity Scan upload 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> 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 --- .travis.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) -- 2.7.4 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= + # 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