From patchwork Thu Jun 22 03:32:13 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: 106140 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp2255262qgd; Wed, 21 Jun 2017 20:37:44 -0700 (PDT) X-Received: by 10.55.165.17 with SMTP id o17mr513038qke.14.1498102664295; Wed, 21 Jun 2017 20:37:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498102664; cv=none; d=google.com; s=arc-20160816; b=DJVAsHo10RTTKD9I3pOJRhY0iaPOGJJbo+SvjV3TU3awPEHmqKEuGBXpXKuZwlurAe 5A8b4DvTXQ4FyF7tPD5nKyVsiWkaSdNUTV4l2dM8PTrb3qGuDwvXWI0aeNKdIaT0WC8S g/RQEE4qKCg3aKhEC4GsMU2tyfpwgn+D5y1U/Un0TsGaZCMLJ68+NMXN3LIscy0Sh9V5 JIOAjRQBBEv61BtCu6iDY9e/uiPnPvgcK4sGXlZGlJ4BwlVo/A9iH0pLCyqiGSzljkNx YLYfF5F0PiT5WrBLh56CecgLfpbnjKEH1P5r5ejkVenUjxtUftf2ZbThK4dAOvnEb6k2 W8vA== 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=Samh73KsaWXVAV7ehrlXIIAkdNB+PWMBxYXH3Af47XY=; b=PseikHGskdl95nwhk2Xyve4BsGS7ZF3Gn/y5bwXXWJ9VfH6TfkA43Dys3Tff4mfWa3 6Pk4nYpATHgLfN2Qoq9tL+iB/VeS1q+KNJGVOFCfKGn4HdJTKN/TojlrR3ZJEdsDwAbb +rwoZTgMv25J+NdpcQgIcEEvA3I8ipR5zzAtnA31841mQOEL/Odc/UJqH8ZZU6aAslX8 yCeKV8He3AheneTn1CAETC6c8PzNHVEqdrMb2Gcp7Osm5lSNHxnK+48ujjmlb+PwQWWc UTLoAKW1tbEwFw9WHvDPzxV/fGnKG81E/jS4RNelS+1A04tVP85lNX3Y7H3av+esyQI6 9k/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.b=lsLAOk9d; 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 x128si297118qkb.217.2017.06.21.20.37.43 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 21 Jun 2017 20:37:44 -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=lsLAOk9d; 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]:56879 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNsw9-0000Nr-FJ for patch@linaro.org; Wed, 21 Jun 2017 23:37:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56108) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNsrh-0005bb-SB for qemu-devel@nongnu.org; Wed, 21 Jun 2017 23:33:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNsre-0004fO-Nu for qemu-devel@nongnu.org; Wed, 21 Jun 2017 23:33:05 -0400 Received: from mail-qk0-x244.google.com ([2607:f8b0:400d:c09::244]:36604) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dNsre-0004fB-JT for qemu-devel@nongnu.org; Wed, 21 Jun 2017 23:33:02 -0400 Received: by mail-qk0-x244.google.com with SMTP id r62so603660qkf.3 for ; Wed, 21 Jun 2017 20:33:02 -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=Samh73KsaWXVAV7ehrlXIIAkdNB+PWMBxYXH3Af47XY=; b=lsLAOk9dAmNHbJvvVFrQUTIBCRDWiq7hOx7RiRQouA/VK7Xy82m+5ti0UDsbmgM81A HyZ46mNRAardrmy8MifYpeeMS8ZdWgVvbrsf1uz39EITnCMj5fWSo5f94tRULTZyYFuN fnvXfyiEXM2xv/jeHzJyEbusJwt+0YJ83NJ2S7/iQC7uh7meiesYRbkQWcRsm8fhFHtn +5aMVgm4JFyEaV1JU+I8CAb+tDwtrdt9uGO9HoAQvFBiXz+XUBi9EbRodYlwXcf8VqGO ejzVrdz4dOpGZS2fbehT2ghCXdlfpvmOd+HapUq2bDrVh8sMC1OqGS+RlZF3so6rW7fk Nn7w== 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=Samh73KsaWXVAV7ehrlXIIAkdNB+PWMBxYXH3Af47XY=; b=IqtBR1D8a5rJ8h9gfOkBk0eCdrXQtLSWZBXSc6f/8WSYxzIXRRPw+wotVJv0ycICTZ WAaNGof0g2eihQ49auuQHrWoQdbVbe7uoQWs5tgtTHEh8JW+Ni3GvrhzFdImYbaRsjK1 ITA8FrptUdprSS1RVD5Ql/eEWLyDZtJs+8h5KhEXZfv7CWihf+0I6VgE45/KUFHB3HFz B1xsVSehG7IU8Z+3Cdr8YctZoqWSsqTN2gwt5vMQh4EgLJkKNo3KJB0uZVdKUbBe+YLJ 0nbvfHiX2i5PRabobGAC3zhhOhcsFSWzCoi6XjQTjo48Ftnzw84T6HL2e5E0IGx78g0R v5Fg== X-Gm-Message-State: AKS2vOwGF7qPnz45WbukFll6DrwhLq+WdPfP+OZT5JTkCORO/mqtU4s5 B76LTt0SZCuv6nOH9Bs= X-Received: by 10.55.141.67 with SMTP id p64mr518117qkd.164.1498102381918; Wed, 21 Jun 2017 20:33:01 -0700 (PDT) Received: from yoga.offpageads.com ([138.117.48.226]) by smtp.gmail.com with ESMTPSA id g39sm247454qtc.12.2017.06.21.20.32.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Jun 2017 20:33:01 -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: Thu, 22 Jun 2017 00:32:13 -0300 Message-Id: <20170622033231.19344-4-f4bug@amsat.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170622033231.19344-1-f4bug@amsat.org> References: <20170622033231.19344-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:c09::244 Subject: [Qemu-devel] [PATCH v2 03/21] 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 f78300ee99..53d8e79bf5 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: @@ -162,28 +171,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 Thu Jun 22 03:32:15 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: 106142 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp2256447qgd; Wed, 21 Jun 2017 20:42:02 -0700 (PDT) X-Received: by 10.55.146.133 with SMTP id u127mr498834qkd.17.1498102922809; Wed, 21 Jun 2017 20:42:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498102922; cv=none; d=google.com; s=arc-20160816; b=PqIQHhORuUey2uP7attwUmqJIAQd1oBUtGpqWWiDJzwRzil50BdRd9Mfw2A9CGyuov tCI1sDhDzj7xuPUMDx2homFuO4jQQ91SdCXaMLiFH6ZzLawSpIbzj+KOuhWwapOBQb1u I5mjIEeA5zMTjFPlbR+FXRw4h3lUYRG4dbyICHH81cBsoh1x3oBVU6J+uYDIh2Dd/FjC GBRXETAS3RbrfAvRiC4qWwyrr3EQHTZhEliOW4st4vD8Yq0YNsbTTRwqqOeE/1dYRj3/ mE/7z1XmYJmxo05lSudBEchTALFpbHZ+r/ivFurUiQnK6lo9oifuU0kKSRV1AHttyk3I OgUA== 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=MDJ85BVuFYh4JEfBK+RmfqvhhOUix/zXBLokUpUceWfGuJjey7frHMWkHamKmFpFYh C9pxyb31YBg+ZYAq0KNeNB0b9wMx5ZxSE1MCnvATXyeXFpJtKsEMYajXlqG3ueg3Kdg7 MGAiEhRx6M21rlPuqE3r9U9HW6wnEmtGeTLqvIJBonAM3uGtqg8z6cUVf2cqWLP0mVwJ VnrEwVH52M0C+POOGD3rfbaHXYX14Wyu5mmTvaOawNqjSDEWqgRfzcu7Q/f+dR4Pwjgh snhZWPTohjnkUqbrnReZu0cPj4iW3cNIUcHQm19TX13zPIhc3z055RqdHl56tdtkkmww 0q7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.b=k8T/H5E+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [208.118.235.17]) by mx.google.com with ESMTPS id y3si320649qta.82.2017.06.21.20.42.02 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 21 Jun 2017 20:42:02 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.b=k8T/H5E+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:56896 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNt0K-0004AT-2K for patch@linaro.org; Wed, 21 Jun 2017 23:42:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56131) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNsrn-0005dD-8m for qemu-devel@nongnu.org; Wed, 21 Jun 2017 23:33:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNsrl-0004lk-PJ for qemu-devel@nongnu.org; Wed, 21 Jun 2017 23:33:11 -0400 Received: from mail-qt0-x233.google.com ([2607:f8b0:400d:c0d::233]:35656) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dNsrl-0004kq-J6 for qemu-devel@nongnu.org; Wed, 21 Jun 2017 23:33:09 -0400 Received: by mail-qt0-x233.google.com with SMTP id f92so2933876qtb.2 for ; Wed, 21 Jun 2017 20:33: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=3n6GZ2eWcBU3woEgXfm/D1mpOZKpiFhq1O6Pe8E9P/w=; b=k8T/H5E+TXHa0MXWFOlARAnqjZy5MbKx0NpQt2X0qcTandnzxKPlJYVGBLhCod5mVP wYN6kLfRW1+UlhYFzf4ixnplEZ5xzPFVBxCuRuH+sRN4YxmrBvzDDulV471Po1kYY5td 5NWp2lRFlNTCKmkdI7d4LM3DxgXO0y8Opw/LTXrW4QUaPGGqpdqgP9hboKsu0BGjer4c hERqMxaINN5/JSI+Voine+kCFJFhv2PZTVA9Hix90aWffMxzpB1gVGrjEGQfx6+Lf9cO m46DbM5m7zjABihfUJPqi02qrfzsesicO8pb3SxqgtcFjl52JoIbmBkrWbmBRtxZDY/e J8yg== 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=ENwLlGFt4eDPeIx3q+E3TG+p/9bL5DZ10HZ+P6o2VyuXCLroTPNZ7M9sm9IFZaEzBr EUhYd05tY8My81C2TjZ7QqYgRSHxxABFB7sC5w2GvRXEdjVV144hZQKuXKWpYCEt7bdO JvJ5p2ltcjvE3oRRDJihhekCngfHmpebS0yGM93RjAUgI657nM7JfBBskkgOqbOmtV6a 4L/xX7oXdbOUXBV0HuuF/700BKqOlpWrcEgb3BMeV+D1sFLmkTcDDombJ1a2k/JkdXd0 i950CFvKrcFO8XBcUjQTALyshlJHGT5/iB+fyc0QxdEF0LafP7+4ma64fvQm2m3l1nnA w7AQ== X-Gm-Message-State: AKS2vOz1ZlbUJQIZN9At4S/ZILcErJXYj5G4xdNTgIRtZfFP5zSvjm7b Llv97jmRN3MSCbPzYT8= X-Received: by 10.237.47.228 with SMTP id m91mr462967qtd.242.1498102388761; Wed, 21 Jun 2017 20:33:08 -0700 (PDT) Received: from yoga.offpageads.com ([138.117.48.226]) by smtp.gmail.com with ESMTPSA id g39sm247454qtc.12.2017.06.21.20.33.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Jun 2017 20:33: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: Thu, 22 Jun 2017 00:32:15 -0300 Message-Id: <20170622033231.19344-6-f4bug@amsat.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170622033231.19344-1-f4bug@amsat.org> References: <20170622033231.19344-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::233 Subject: [Qemu-devel] [PATCH v2 05/21] 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 Thu Jun 22 03:32:16 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: 106141 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp2255754qgd; Wed, 21 Jun 2017 20:39:37 -0700 (PDT) X-Received: by 10.55.214.2 with SMTP id t2mr446048qki.220.1498102777150; Wed, 21 Jun 2017 20:39:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498102777; cv=none; d=google.com; s=arc-20160816; b=oGRYc6fyfaVahAPWMclxcsy/uXrHu2igRz3YIWlvqtIIYqBjB3AFe3NGVucV9h/3Si 0R6E0+ScZGbG7PR7q9sWUXpo6eBeEn7d//4fdXoiL81q9gV/mzZ+i6peOxwPHNg7kfvu kZVDE3Grnm16RGCyyuYIOhIyWWHvmdZH3QaT56B8NfpnxzV4FmyFuUG7d3syGSxc13/H TCGv+3Mhvl5dLEdIY7pwkmtQR6fZ116HjZyaiel/qclh8By+yHktW5srjo/E8He7/Rrv 5xzLYZHhtK73ku/Os8lR1aHjXZzf6PVerBCkRDuCBdZI/Qbdw86W+rWeZyvi7T1WZ77D trUA== 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=DWPTf11AaT1PXKOs7ftM3yjH6O/xHzuc89nzUZ8r4xk=; b=cPgzAIUgTQeZYgXnOQIbEFN2P7A66g1XADWoK9qPJRbfLc5xSU+Sw49P/XsxCYI1pu 9kPrJVyXe/NYNFJZj1J4773p9zrvNkyEzWI+NEr9FvrXZ7DSZ7ZiPRgUXRNGQHk3TTC+ CWyqyFLyj98cZ2/uHtcxHiT8gTiMqtw4CKBxr/lSzsSMe4WrFF+x+jycVTwN0zd6c89d Ka6ygElOAORtmMsioa6oqsJ1MOekbnxeaYQ1BhpXG4BsbpErl/vZh5lF71lQZUEbXYyL lMKchi7ldmcSTmU4NYSI300lMHnVHp2Zr+0GAYD9K4/4Ninwp9lO+2UbvvG+ejFgFMoF wRWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.b=omlmMxVe; 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 138si304975qkh.173.2017.06.21.20.39.36 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 21 Jun 2017 20:39:37 -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=omlmMxVe; 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]:56884 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNsxy-0002Lv-SH for patch@linaro.org; Wed, 21 Jun 2017 23:39:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56154) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNsrq-0005fe-Gw for qemu-devel@nongnu.org; Wed, 21 Jun 2017 23:33:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNsro-0004qj-4N for qemu-devel@nongnu.org; Wed, 21 Jun 2017 23:33:14 -0400 Received: from mail-qk0-x229.google.com ([2607:f8b0:400d:c09::229]:33918) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dNsrn-0004qF-W7 for qemu-devel@nongnu.org; Wed, 21 Jun 2017 23:33:12 -0400 Received: by mail-qk0-x229.google.com with SMTP id d14so3032972qkb.1 for ; Wed, 21 Jun 2017 20:33:11 -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=DWPTf11AaT1PXKOs7ftM3yjH6O/xHzuc89nzUZ8r4xk=; b=omlmMxVeLr70xrzWuUp7kKJOUR98md7x/xpm/umK1rWvmafAr9Ehp2SCCLi4HZrV8+ yvF78HW4XxD8GOXE5q9mqf0TixD4830ip+B9GIDOw5YcpxJJmOEJTkR9qeG7hCTHU092 G0quICXXbj12/SCuq2EI3A5olieaS9OaHEXz2444xqVhFnKPsvQIbKDYzUopch3acZAA mrzhnQpd4DJrKWuJUWIHOnqOrKTNKnHufpLwLqkO4oPKbK101HVPFKyNkNmcm8IzgZoG JO+tyh4Kf3XDQvPccOV/nKbKXG587cxOw7u0ufizUtvwn/VzQp+Zk44S71oPtiHyU7Rj y8YA== 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=DWPTf11AaT1PXKOs7ftM3yjH6O/xHzuc89nzUZ8r4xk=; b=N4Wh7talWIrC49tqlSzncZxL7nZ60Zux48ZEM4wCjk/ig6StVUNLAQk3yaP5uxbIf6 BGC57X9BWePnTnQeQn6eyKnn0Fip6EOBYqmq5RUFFXmrh6t0Fz20ztX6qoparmyl5UzJ z1h+Unjyf1NZ4b1ITjgCuLgO6zghmssDB9+rkeJhE5fIpylEwi04htKqiJQIdchau2PT 3lYcTNfl+sz7vUNw+yWBPemNdQFgCfjJby8pP1MHC6+e3cInqEe8RDf78oHesiOYAuTl bhHOv58idy4cgypU8XtDrVnZUqtp81qCikCJOS/Qcjzd9nngVDIcYcjVKeOXaco4BXT9 jOnw== X-Gm-Message-State: AKS2vOx/Q9+auRPNWnbJWytxjHA3QjiC1p6WAqjtMlv45PJe9un0I1D0 1ccM9LCqtp+bUn+99Q4= X-Received: by 10.55.18.90 with SMTP id c87mr463738qkh.174.1498102391178; Wed, 21 Jun 2017 20:33:11 -0700 (PDT) Received: from yoga.offpageads.com ([138.117.48.226]) by smtp.gmail.com with ESMTPSA id g39sm247454qtc.12.2017.06.21.20.33.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Jun 2017 20:33:10 -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: Thu, 22 Jun 2017 00:32:16 -0300 Message-Id: <20170622033231.19344-7-f4bug@amsat.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170622033231.19344-1-f4bug@amsat.org> References: <20170622033231.19344-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:c09::229 Subject: [Qemu-devel] [PATCH v2 06/21] 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 0220f7472e..29c9ef72a4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -218,3 +218,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