From nobody Tue Feb 10 17:31:24 2026 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.zohomail.com; dkim=fail; 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; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1530306001761839.2162523798505; Fri, 29 Jun 2018 14:00:01 -0700 (PDT) Received: from localhost ([::1]:44447 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZ0Uq-0005qM-Sc for importer@patchew.org; Fri, 29 Jun 2018 17:00:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56218) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZ0Nm-000846-02 for qemu-devel@nongnu.org; Fri, 29 Jun 2018 16:52:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZ0Nk-0006QC-VB for qemu-devel@nongnu.org; Fri, 29 Jun 2018 16:52:42 -0400 Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]:38857) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fZ0Nk-0006Ol-Ox for qemu-devel@nongnu.org; Fri, 29 Jun 2018 16:52:40 -0400 Received: by mail-wm0-x233.google.com with SMTP id 69-v6so3270707wmf.3 for ; Fri, 29 Jun 2018 13:52:40 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id j7-v6sm4741591wrn.96.2018.06.29.13.52.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Jun 2018 13:52:34 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 4265C3E0317; Fri, 29 Jun 2018 21:52:33 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bRpbPm13lorLId8VksREIcnpDhBdJ4PsEKuVIqX5wv4=; b=dGNacW6iPkZ0NfkklOjsYfIzq5hZ8dToKP841C9JwrZzuvd4UgC7WwfFX444xrrQd9 XtK1YiIaeh+t7JazZ1TDScsb+unfBplEU+C9i5fmIRMK/aP/ZQrykMDj3lolBLUI274l 5JYhpqEs/75cHpOQy56FEUCMfT+CDV3QggmMI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bRpbPm13lorLId8VksREIcnpDhBdJ4PsEKuVIqX5wv4=; b=gKvjvzDcLlEQlcEz/F590jkn0xYlG/HLnMm7pg5StkK9TnkwboalhPaLo3cua7GIka lanl8PwmSNwi5Z6ANYJQuZQw8RitoF9yCyYWt8GH3snu72oLC2siyEUM7LICnRwJiNew 0kvaoSZZDINEW9HXtfYWV33zkFL5LnNauZMlDbBoBF6rphswMjB37W4/+zjWvws7XeLq ZiA3jEtkvgNqqTk7fzDP6dYkqpp8t8WAuICXv58mar+dGqC5s/nURROmC1XDZWz1IDaX ty9DDFNab4pOCiXpNKKgPSv9+fGpGc88q8GRWTZr6uUOQyzRlh5CSt91zN3ywDlZA+a8 lpgQ== X-Gm-Message-State: APt69E1rv+7MeLV0DOFSTTGz4RzzmfgkKUX2wGbIpEAOYDh42221ozxW nkFDvAKYDtlgjrMf6E0WuXLuBw== X-Google-Smtp-Source: AAOMgpe/WyUXQIm/xZa6j2aQLAPem1vVKKaN7KLSxZG8W0Xdv9cM82xasPeuzrSi7gJ0EU4vpGIgHg== X-Received: by 2002:a1c:7f95:: with SMTP id a143-v6mr2645930wmd.108.1530305559577; Fri, 29 Jun 2018 13:52:39 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: cota@braap.org, famz@redhat.com, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de Date: Fri, 29 Jun 2018 21:52:17 +0100 Message-Id: <20180629205232.27190-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180629205232.27190-1-alex.bennee@linaro.org> References: <20180629205232.27190-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::233 Subject: [Qemu-devel] [PATCH v2 06/21] travis: add gcovr summary for GCOV 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: pbonzini@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 This gives a more useful summary, sorted by descending % coverage, after the tests have run. The final numbers will give an idea if our coverage is getting better or worse. To keep the width sane we need to post process the file that the old gcovr tool generates. This is done with a mix of sed, awk and column in the scripts/coverage-summary.sh script. As quite a lot of lines don't get covered at all we filter out all the 0% lines. If the file doesn't appear it is not being exercised. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Daniel P. Berrang=C3=A9 --- v2 - pushed finagling into scripts/coverage-summary.sh - dropped r-b as a big change --- .travis.yml | 3 +++ scripts/coverage-summary.sh | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100755 scripts/coverage-summary.sh diff --git a/.travis.yml b/.travis.yml index 32188d51f1..aa850c913c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,6 +38,7 @@ addons: - libvte-2.90-dev - sparse - uuid-dev + - gcovr =20 # The channel name "irc.oftc.net#qemu" is encrypted against qemu/qemu # to prevent IRC notifications from forks. This was created using: @@ -86,6 +87,8 @@ matrix: compiler: clang # gprof/gcov are GCC features - env: CONFIG=3D"--enable-gprof --enable-gcov --disable-pie --target-l= ist=3Daarch64-softmmu,arm-softmmu,i386-softmmu,mips-softmmu,mips64-softmmu,= ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu" + after_success: + - ${SRC_DIR}/scripts/coverage-summary.sh compiler: gcc # We manually include builds which we disable "make check" for - env: CONFIG=3D"--enable-debug --enable-tcg-interpreter" diff --git a/scripts/coverage-summary.sh b/scripts/coverage-summary.sh new file mode 100755 index 0000000000..d7086cf9ca --- /dev/null +++ b/scripts/coverage-summary.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# +# Author: Alex Benn=C3=A9e +# +# Summerise the state of code coverage with gcovr and tweak the output +# to be more sane on Travis hosts. As we expect to be executed on a +# throw away CI instance we do spam temp files all over the shop. You +# most likely don't want to execute this script but just call gcovr +# directly. See also "make coverage-report" +# +# This code is licensed under the GPL version 2 or later. See +# the COPYING file in the top-level directory. + +# first generate the coverage report +gcovr -p -o raw-report.txt + +# strip the full-path and line markers +sed s@$PWD\/@@ raw-report.txt | sed s/[0-9]\*[,-]//g > simplified.txt + +# reflow lines that got split +awk '/.[ch]$/ { printf("%s", $0); next } 1' simplified.txt > rejoined.txt + +# columnify +column -t rejoined.txt > final.txt + +# and dump, stripping out 0% coverage +grep -v "0%" final.txt --=20 2.17.1