From patchwork Fri Jun 16 16:13:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 105754 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp1386092qgd; Fri, 16 Jun 2017 09:24:19 -0700 (PDT) X-Received: by 10.200.44.36 with SMTP id d33mr14022876qta.182.1497630259537; Fri, 16 Jun 2017 09:24:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497630259; cv=none; d=google.com; s=arc-20160816; b=GWlc2d83d2VJD4NLuQjX4zvkIMOY+Gyk+Ob/5zWIJXWw8S3PGld/n9DvR/4dDKinu3 MywOoyFL4u+Emot4ceeuHXtLOkthySLzA4xSmYrr4GOmv3x4MPrjejHyf3CtMp3v7uG3 b9vUe82gbn7wx8Q2rgZjM5fixq9Hf0LIXI5OcKvWB2w/vttC2ISg2OTUTZHPxobcxwk6 SWa7dsPOyZiVJj1N6e5Lln98h7dSnNbK/yjUugZwhERCIuALFUfiRaI+RtjhwOMrGoQH 8+4owJj9n9mq6a1QRLeM6jt0x9HF/282+GmF9KlwbXWE89MaGINj9MwQtR/82vkd5j8k FqJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=NMXdX9AwyWS2RZDk8DXKXHP0FCnmosdKpvrTZRQ88l4=; b=mQQNjZ2OEJRnZvKiVh2mdZbpKBpT6p6Y0wv/knF3pu7tl0lU1xL5E+wtWHz7ZS/SAL RTglPIt955zAK9ziOoKOCfIv1yK1CKLc0q2iNrQnAslzUN0L82+a0IVJDoyeMChtsVUa tQEb19OVj43Z4SbalnYw5kjWptg20m6AYV0mIIfk3jI2F+hehGSAal/wOknaIHrKYklu JoAtBHnY7hPxUTf91+HBpfBBNR95SDsdIZ6lt7DBBfynX7IOLbdbyfr7CQKLTA+udYlI xCNpRI0SYAZsktCafHBcGqGCsUkQg+04+lk50h4yZoQNL8EHcTvjTTkpQWQpZjlHHRmO ixWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.b=Xyy0JLiS; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id t25si2316767qth.4.2017.06.16.09.24.19 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 16 Jun 2017 09:24:19 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.b=Xyy0JLiS; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:59821 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLu2j-000585-8T for patch@linaro.org; Fri, 16 Jun 2017 12:24:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLtsy-0004LX-CE for qemu-devel@nongnu.org; Fri, 16 Jun 2017 12:14:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dLtsv-0002kh-G7 for qemu-devel@nongnu.org; Fri, 16 Jun 2017 12:14:12 -0400 Received: from mail-yw0-x244.google.com ([2607:f8b0:4002:c05::244]:34434) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dLtsv-0002kZ-Bg for qemu-devel@nongnu.org; Fri, 16 Jun 2017 12:14:09 -0400 Received: by mail-yw0-x244.google.com with SMTP id w143so2837302yww.1 for ; Fri, 16 Jun 2017 09:14:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NMXdX9AwyWS2RZDk8DXKXHP0FCnmosdKpvrTZRQ88l4=; b=Xyy0JLiSVDiCC7COAVF+D/ZM+P8XdlsR5WfpzZoid+OTOQW4+bhV8hVFSPEA5I8JvJ ObBC75xPbc+QoT/7DZK7azXIBRbsL6Evbpo5EfDp1oPOSOZC/WZlxnXlqyPE3Ez3kfUB WoidUU4ftUnSdB9nH8mz8JJMZYlqAKsDcz6jSsInkgfb+s50tgy4iUJkhwzEKmDAofMk TAs4jChWx6s6diRWqazWTkZPXb1siA0P50J3gA8qTLBSTAS75KLxFXbrikoXvY/75HiG akNVAn1DUPw0k8aDtVMLlHfQyGknsDn1DYtyruaYxmoPSnKXddlrwWcdgVNoMTQKl2Qt U1fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=NMXdX9AwyWS2RZDk8DXKXHP0FCnmosdKpvrTZRQ88l4=; b=j3yxcenf1qrc3WB7e8puRCmewOLHBWLQkIhNkrUF4E0fzXfPL2kHOlT/2BnRXafTie ItSObmRjA8xx4ZQsiO3lHjn5c5ipdAFh87wfvcXkhfIsiJCT8jx5RQPiwXDz6YqKNvk5 mCEMzONyOSOsHGrpnBnvFTzXF0HFy+ElqEpkNI/iQFIuV5h9a8ZYGf88+TOBwL/8Z5sc duS70XwwvMI13Tj6eXe4JCKC8+QUkTD8HEXNceqj3G8xm3NX4tEqA/HrtVBonRfjDH6e 2hak1meGCwg/kyFGuoHI6vfoKx94GGlev0+XmAXLtmnH8cAqZzj5pH8TNIif62PQ/4qc qzUA== X-Gm-Message-State: AKS2vOzBLceOVkvSCjOpGhbS2jjMMVogYUWovZtFfcGrXdkJWuY1NdKk Xiv8/qVactWkqDHIn2U= X-Received: by 10.55.116.197 with SMTP id p188mr13754496qkc.233.1497629648575; Fri, 16 Jun 2017 09:14:08 -0700 (PDT) Received: from localhost.localdomain ([138.117.48.226]) by smtp.gmail.com with ESMTPSA id a62sm1691420qkd.14.2017.06.16.09.14.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Jun 2017 09:14:07 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Fam Zheng , Peter Maydell Date: Fri, 16 Jun 2017 13:13:30 -0300 Message-Id: <20170616161334.7492-8-f4bug@amsat.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170616161334.7492-1-f4bug@amsat.org> References: <20170616161334.7492-1-f4bug@amsat.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4002:c05::244 Subject: [Qemu-devel] [PATCH 07/11] travis: install more library dependencies 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: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell Update the travis list of library packages to install so that our build tests cover more of our code base. Signed-off-by: Peter Maydell Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé --- .travis.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) -- 2.11.0 diff --git a/.travis.yml b/.travis.yml index 69a960b714..4889c192c2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,28 +11,37 @@ addons: # Build dependencies - libaio-dev - libattr1-dev + - libbluetooth-dev - libbrlapi-dev + - libcap-dev - libcap-ng-dev - libgnutls-dev - libgtk-3-dev - libiscsi-dev - liblttng-ust-dev + - liblzo2-dev - libnfs-dev - libncurses5-dev - libnss3-dev - libpixman-1-dev - libpng12-dev - librados-dev + - librdmacm-dev - libsdl1.2-dev - libseccomp-dev + - libsnappy-dev - libspice-protocol-dev - libspice-server-dev - libssh2-1-dev - liburcu-dev - libusb-1.0-0-dev + - libvde-dev - libvte-2.90-dev + - libxen-dev + - nettle-dev - sparse - uuid-dev + - xfslibs-dev # The channel name "irc.oftc.net#qemu" is encrypted against qemu/qemu # to prevent IRC notifications from forks. This was created using: @@ -164,28 +173,37 @@ matrix: # Build dependencies - libaio-dev - libattr1-dev + - libbluetooth-dev - libbrlapi-dev + - libcap-dev - libcap-ng-dev - libgnutls-dev - libgtk-3-dev - libiscsi-dev - liblttng-ust-dev + - liblzo2-dev - libnfs-dev - libncurses5-dev - libnss3-dev - libpixman-1-dev - libpng12-dev - librados-dev + - librdmacm-dev - libsdl1.2-dev - libseccomp-dev + - libsnappy-dev - libspice-protocol-dev - libspice-server-dev - libssh2-1-dev - liburcu-dev - libusb-1.0-0-dev + - libvde-dev - libvte-2.90-dev + - libxen-dev + - nettle-dev - sparse - uuid-dev + - xfslibs-dev language: generic compiler: none env: From patchwork Fri Jun 16 16:13:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 105753 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp1384091qgd; Fri, 16 Jun 2017 09:19:33 -0700 (PDT) X-Received: by 10.55.101.202 with SMTP id z193mr13052833qkb.28.1497629973279; Fri, 16 Jun 2017 09:19:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497629973; cv=none; d=google.com; s=arc-20160816; b=0hA1WOjeAqzidegUecEHaCpJ6rHMhgtehPgjehb4Xa/JzcNjkdGEmO0Y/6Oe02GCsx TAYMGFG8k4MKz5RJZN/ppqxW9uGPwbXi66P8vOwU0YDfP9aNPiAfSMETlGp/YadB5iYc gS5U7hubNQV/dzyik3MZdbwlGeOcqAh2fmm+LrC04njB9cgjgm7lb9RTUqZA8v5qAQnV LAMwsIdhjlRBYyjjbngpN5Nq3V8oRwBUXNOh0I1nK8UxTnlwcm/lInB5KsGhZENe/42m H+0qypbsKy7Bie8scoPB1+tOsRyYQLwF8pZx+QBls3upqfmGPrC7c1ZCUdx01Zeq3wPN od1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=3n6GZ2eWcBU3woEgXfm/D1mpOZKpiFhq1O6Pe8E9P/w=; b=URIGHN4CrLbsx/rAwKLEWJ7Schjc1+6ljiW489Qhoc93YA85JJzMclWWOEsOWEkqKp 7BtXg1hIGBpC/JurxS55WGTdXJuInYtC6J4DyF4UyElKNMOI9Rs5oEwb3hyWrnnnV4CC ALYUpnyHzre/sRJ5yQ1E+Xejklyz7ahpKI3PV/1ernT849kfc1FdUrHGzl1Sw13YMftR DVTToAISUHkwXxC2WvaTBapqHUH26OLTv2mkP3qjgAGhS8wjf3InhwLDtR+uqovR3kq4 XZ4JhjPP3R35aHzLsJp9O5bnkHdHnp6YLMJnEeAFs2Xt6c77pRv4vn4E4FokCzSvLrxu Is/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.b=FwQWrWsx; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id d27si2360365qtd.341.2017.06.16.09.19.32 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 16 Jun 2017 09:19:33 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.b=FwQWrWsx; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:59785 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLty6-0000TN-L7 for patch@linaro.org; Fri, 16 Jun 2017 12:19:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55582) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLtt2-0004RI-Ct for qemu-devel@nongnu.org; Fri, 16 Jun 2017 12:14:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dLtt0-0002lw-SS for qemu-devel@nongnu.org; Fri, 16 Jun 2017 12:14:16 -0400 Received: from mail-qt0-x234.google.com ([2607:f8b0:400d:c0d::234]:36394) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dLtt0-0002ll-NH for qemu-devel@nongnu.org; Fri, 16 Jun 2017 12:14:14 -0400 Received: by mail-qt0-x234.google.com with SMTP id u19so69237100qta.3 for ; Fri, 16 Jun 2017 09:14:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3n6GZ2eWcBU3woEgXfm/D1mpOZKpiFhq1O6Pe8E9P/w=; b=FwQWrWsxZv2ngipCZq6AXWTPlbVUOUHawCTtSBk9MYRohjX5KSCZUkaLV5SrPbxoWv 8/CctE6Oa4ufHMxiuV8Te0NKk2jCKNkNpToDoVIyvmY7UB68dXOW7LlFRd3aFs2fRyKU 72kw0WmKGmRctKp1z85FIHo53rfYWClAOSw42uYo5VZ8IDz/eLFsu+14q/g3Teyi8SNb iRIIj137zyADXA3MBilf2VlPlGtBWvjIevkupHkD/cYCk6WG4y29v2YevTcbb/VP43Qk yBvSCHyWjqRXJ2mwJVrI2viGPw34GhLjPWclPgMwM9EhA4nm7KQIl/+Yv2UVDWs+m14G OeIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=3n6GZ2eWcBU3woEgXfm/D1mpOZKpiFhq1O6Pe8E9P/w=; b=euxOir0StwOoeEQfw3Tn0YFwK6JfNRFcjuQDgMpvUG0zlOBYahWv6WCztaRZp54QOV hCN07HBCP5CPnTG09RI2+Zn9mVbF+vv8qNRBu7g5cIdrYxR6VCzNiNjYt8OFoN9vI3Jb 1vNYepUO5AzQ142l9Yw9lJhz90Tq7cabzSNwjgBtatowCA1GF7tI7WEWWRaRJi5SoRh4 arhJ36cgQAfLjRQfhMo4RC0nEn538GZVLlIkDqyaeYmL/HGHMPDyxzOqcg3uD4k9G7ww Ra3QCgIqmH/Ug+Ak9jBbb6Qexg7GuYO21o3vvSgWR44JWooUNtRjeLI4HMxUJ6iC6aJn CL3w== X-Gm-Message-State: AKS2vOxOVukksoIEl/g6hoxhE5FKtu4Ve13NY5WSdAz6sZvztk6vQy8H So2rPbhh27U3ecBuL+0= X-Received: by 10.55.191.197 with SMTP id p188mr13877699qkf.69.1497629653712; Fri, 16 Jun 2017 09:14:13 -0700 (PDT) Received: from localhost.localdomain ([138.117.48.226]) by smtp.gmail.com with ESMTPSA id a62sm1691420qkd.14.2017.06.16.09.14.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Jun 2017 09:14:13 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Fam Zheng , Peter Maydell Date: Fri, 16 Jun 2017 13:13:32 -0300 Message-Id: <20170616161334.7492-10-f4bug@amsat.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170616161334.7492-1-f4bug@amsat.org> References: <20170616161334.7492-1-f4bug@amsat.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::234 Subject: [Qemu-devel] [PATCH 09/11] scripts/run-coverity-scan: Script to run Coverity Scan build 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: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell Add a new script to automate the process of running the Coverity Scan build tools and uploading the resulting tarball to the website. This is primarily intended to be driven from Travis, but it can be run locally (if you are a maintainer of the QEMU project on the Coverity Scan website and have the secret upload token). Signed-off-by: Peter Maydell Reviewed-by: Alex Bennée Signed-off-by: Philippe Mathieu-Daudé --- scripts/run-coverity-scan | 170 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100755 scripts/run-coverity-scan -- 2.11.0 diff --git a/scripts/run-coverity-scan b/scripts/run-coverity-scan new file mode 100755 index 0000000000..e6d5fc58d8 --- /dev/null +++ b/scripts/run-coverity-scan @@ -0,0 +1,170 @@ +#!/bin/sh -e + +# Upload a created tarball to Coverity Scan, as per +# https://scan.coverity.com/projects/qemu/builds/new + +# This work is licensed under the terms of the GNU GPL version 2, +# or (at your option) any later version. +# See the COPYING file in the top-level directory. +# +# Copyright (c) 2017 Linaro Limited +# Written by Peter Maydell + +# Note that this script will automatically download and +# run the (closed-source) coverity build tools, so don't +# use it if you don't trust them! + +# This script assumes that you're running it from a QEMU source +# tree, and that tree is a fresh clean one, because we do an in-tree +# build. (This is necessary so that the filenames that the Coverity +# Scan server sees are relative paths that match up with the component +# regular expressions it uses; an out-of-tree build won't work for this.) +# The host machine should have as many of QEMU's dependencies +# installed as possible, for maximum coverity coverage. + +# You need to pass the following environment variables to the script: +# COVERITY_TOKEN -- this is the secret 8 digit hex string which lets +# you upload to Coverity Scan. If you're a maintainer +# in Coverity then the web UI will tell you this. +# COVERITY_EMAIL -- the email address to use for uploads + +# and optionally +# COVERITY_DRYRUN -- set to not actually do the upload +# COVERITY_BUILD_CMD -- make command (defaults to 'make -j8') +# COVERITY_TOOL_BASE -- set to directory to put coverity tools +# (defaults to /tmp/coverity-tools) + +# The primary purpose of this script is to be run as part of +# a Travis build, but it is possible to run it manually locally. + +if [ -z "$COVERITY_TOKEN" ]; then + echo "COVERITY_TOKEN environment variable not set" + exit 1 +fi + +if [ -z "$COVERITY_EMAIL" ]; then + echo "COVERITY_EMAIL environment variable not set" + exit 1 +fi + +if [ -z "$COVERITY_BUILD_CMD" ]; then + echo "COVERITY_BUILD_CMD: using default 'make -j8'" + COVERITY_BUILD_CMD="make -j8" +fi + +if [ -z "$COVERITY_TOOL_BASE" ]; then + echo "COVERITY_TOOL_BASE: using default /tmp/coverity-tools" + COVERITY_TOOL_BASE=/tmp/coverity-tools +fi + +PROJTOKEN="$COVERITY_TOKEN" +PROJNAME=QEMU +TARBALL=cov-int.tar.xz +SRCDIR="$(pwd)" + +echo "Checking this is a QEMU source tree..." +if ! [ -e VERSION ]; then + echo "Not in a QEMU source tree?" + exit 1 +fi + +echo "Checking upload permissions..." + +if ! up_perm="$(wget https://scan.coverity.com/api/upload_permitted --post-data "token=$PROJTOKEN&project=$PROJNAME" -q -O -)"; then + echo "Coverity Scan API access denied: bad token?" + exit 1 +fi + +# Really up_perm is a JSON response with either +# {upload_permitted:true} or {next_upload_permitted_at:} +# We do some hacky string parsing instead of properly parsing it. +case "$up_perm" in + *upload_permitted*true*) + echo "Coverity Scan: upload permitted" + ;; + *next_upload_permitted_at*) + if [ -z "$COVERITY_DRYRUN" ]; then + echo "Coverity Scan: upload quota reached; stopping here" + # Exit success as this isn't a build error. + exit 0 + else + echo "Coverity Scan: upload quota reached, continuing dry run" + fi + ;; + *) + echo "Coverity Scan upload check: unexpected result $up_perm" + exit 1 + ;; +esac + +mkdir -p "$COVERITY_TOOL_BASE" +cd "$COVERITY_TOOL_BASE" + +echo "Checking for new version of coverity build tools..." +wget https://scan.coverity.com/download/linux64 --post-data "token=$PROJTOKEN&project=$PROJNAME&md5=1" -O coverity_tool.md5.new + +if ! cmp -s coverity_tool.md5 coverity_tool.md5.new; then + # out of date md5 or no md5: download new build tool + # blow away the old build tool + echo "Downloading coverity build tools..." + rm -rf coverity_tool coverity_tool.tgz + wget https://scan.coverity.com/download/linux64 --post-data "token=$PROJTOKEN&project=$PROJNAME" -O coverity_tool.tgz + if ! (cat coverity_tool.md5.new; echo " coverity_tool.tgz") | md5sum -c --status; then + echo "Downloaded tarball didn't match md5sum!" + exit 1 + fi + # extract the new one, keeping it corralled in a 'coverity_tool' directory + echo "Unpacking coverity build tools..." + mkdir -p coverity_tool + cd coverity_tool + tar xf ../coverity_tool.tgz + cd .. + mv coverity_tool.md5.new coverity_tool.md5 +fi + +rm -f coverity_tool.md5.new + +TOOLBIN="$(echo $(pwd)/coverity_tool/cov-analysis-*/bin)" + +if ! test -x "$TOOLBIN/cov-build"; then + echo "Couldn't find cov-build in the coverity build-tool directory??" + exit 1 +fi + +export PATH="$TOOLBIN:$PATH" + +cd "$SRCDIR" + +echo "Doing make distclean..." +make distclean + +echo "Configuring..." +./configure --audio-drv-list=oss,alsa,sdl,pa --disable-werror + +echo "Making libqemustub.a..." +make libqemustub.a + +echo "Running cov-build..." +rm -rf cov-int +mkdir cov-int +cov-build --dir cov-int $COVERITY_BUILD_CMD + +echo "Creating results tarball..." +tar cvf - cov-int | xz > "$TARBALL" + +echo "Uploading results tarball..." + +VERSION="$(git describe --always HEAD)" +DESCRIPTION="$(git rev-parse HEAD)" + +if ! [ -z "$COVERITY_DRYRUN" ]; then + echo "Dry run only, not uploading $TARBALL" + exit 0 +fi + +curl --form token="$PROJTOKEN" --form email="$COVERITY_EMAIL" \ + --form file=@"$TARBALL" --form version="$VERSION" \ + --form description="$DESCRIPTION" \ + https://scan.coverity.com/builds?project="$PROJNAME" + +echo "Done." From patchwork Fri Jun 16 16:13:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 105752 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp1383809qgd; Fri, 16 Jun 2017 09:18:56 -0700 (PDT) X-Received: by 10.55.209.6 with SMTP id s6mr13380672qki.245.1497629936220; Fri, 16 Jun 2017 09:18:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497629936; cv=none; d=google.com; s=arc-20160816; b=SWFWXRD7MP/tB2muSw1/0hUqs05Mx+41WhCYhHVOBD2G6HmhzMFmts312yQousajTh KmkMTs8x1pGjxjrtVUHdFoygQ9OvkMtv90/P33eoLmTZdZ2LF8RtvRNhf15bafcJsddv RoP7nTsYLyTqh55A8FYdr8yLCtj33rpsgt4NY9gio9I1DwensX7y5HjcMXflOEPPEFyb 80CmbzDBHEzA4ekeZhiA4AaWY83z4zI0wejoA3oMIVlyv294A8cF7RAfulCSOqhpaAxA jiqIpkJ5lPxsuJ9O72ooXuDpnEeB7CSVFpcvrIzyteNONHSBQQ4L86BJYIVTMo17OkLP ZHaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=UBtjIc9njwYiM9NhEpzkmS/JgF4foqtmWTHkd8UKZTA=; b=d+8thvsUsoIUu4Yp7FAoLvXVfa3claqnYmMkRzzjkl5hHGuvycmik4uacHOeeIRgIY a+0/YC/S8JdWQGlekZhzYo9/1IPTjuJ0MvTZVkMWH47vNXFTvQ7SSF/abniZXY1Hs7hc K+i0axKxdH3bhAsEtxa+bW82Ho4ZJR3AIKNiTHdiIWLAHgEVQRk6Xln6BIOTFTRM4Naz /kHnbAMPDxb+KUXhKLScuGoQNTrbB3M9xGGHYBqNCjIVkB4YqGIx0UcA3NQTf7vcwdL1 KWXPyma/gw5B1f6zXqGRFaofmuQ7Cj0imcAodioeGhWH1gWO0yudJpKncdegXzh4rYi+ k5hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.b=FUwqxdna; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id n45si2358943qtf.130.2017.06.16.09.18.55 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 16 Jun 2017 09:18:56 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.b=FUwqxdna; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:59783 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLtxV-0008Bx-Nw for patch@linaro.org; Fri, 16 Jun 2017 12:18:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLtt3-0004U4-VW for qemu-devel@nongnu.org; Fri, 16 Jun 2017 12:14:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dLtt2-0002mc-Ss for qemu-devel@nongnu.org; Fri, 16 Jun 2017 12:14:17 -0400 Received: from mail-qt0-x22e.google.com ([2607:f8b0:400d:c0d::22e]:32893) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dLtt2-0002mW-Nu for qemu-devel@nongnu.org; Fri, 16 Jun 2017 12:14:16 -0400 Received: by mail-qt0-x22e.google.com with SMTP id u12so69342106qth.0 for ; Fri, 16 Jun 2017 09:14:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UBtjIc9njwYiM9NhEpzkmS/JgF4foqtmWTHkd8UKZTA=; b=FUwqxdnaVop3rryGibr9jUrxCLCxggnGzDgJzIvoBR8Kk0rWcPJKPIFpIkC/DVsPK1 tqt4gKQ2itUe0fU1HxTLec6S0hzzingVBHqIAioVXZlB2bWlH+OP6DoNUXI8jSivt1IV 1ZFX9XQduPdZAptAlnpFzV+lZ1aoSabLoQ426AXBi92PWPRrn5mwVSRPRTMnZ+Wbpsat WJESgYeCoodSvxDN1EQuOQ+dsRqfD6+JYMbGziDjR9k2xkViSLlwZobPAxVb4xLz2Ms3 FwjHC7VXFD61K+10oiwBLZeT8g3sUD6BDxZ30qoQnVaEHKYTK2Rv3u5hp7tOowx1GVxY gOfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=UBtjIc9njwYiM9NhEpzkmS/JgF4foqtmWTHkd8UKZTA=; b=EZAfpCDjhgwhQAH6J7wSO9qkFz/gFOPDdtv3fZCu3eSGEHHUwowGP72snDkYNhetTI wbUSaFcBZF/5r0rYGAPVKSnLKb7gckq8z1kMohWkARYjeXtJIMp7zOYoDLOjuBvmb9E0 TmnH7LlZM1fHWp8PmTDYyoLsjhvSDKHg+B7CsSIK+NFlCKj2a/VkcQYYBcZjiz3Guoco byq9fvsJgL12gbUiqU+opYRAlPIbVDpt7OqVoyVXwxLnFH9GTdCvumyu6AFh3C/VPtHw jLPjgBzQPbKcButF68Jq7l6WYBTdqhFOqri4FMmyTGVcFgGjLuW9XWcFJ101psVPuWSm CU0g== X-Gm-Message-State: AKS2vOxYmbON5F2nnlbM37/GARmNp851HntdoLFuWvXk4joUUOeHTV7R ulqKaq/6DK7abNVp4+c= X-Received: by 10.55.27.96 with SMTP id b93mr13122102qkb.235.1497629656154; Fri, 16 Jun 2017 09:14:16 -0700 (PDT) Received: from localhost.localdomain ([138.117.48.226]) by smtp.gmail.com with ESMTPSA id a62sm1691420qkd.14.2017.06.16.09.14.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Jun 2017 09:14:15 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Fam Zheng , Peter Maydell Date: Fri, 16 Jun 2017 13:13:33 -0300 Message-Id: <20170616161334.7492-11-f4bug@amsat.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170616161334.7492-1-f4bug@amsat.org> References: <20170616161334.7492-1-f4bug@amsat.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::22e Subject: [Qemu-devel] [PATCH 10/11] 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: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell 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 Signed-off-by: Philippe Mathieu-Daudé --- .travis.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) -- 2.11.0 diff --git a/.travis.yml b/.travis.yml index 4c0f7f444e..fc91e2fd28 100644 --- a/.travis.yml +++ b/.travis.yml @@ -220,3 +220,27 @@ matrix: - RUN_TESTS="no" 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