From nobody Wed Nov 5 08:14:59 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.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 1530613211142849.5664484269325; Tue, 3 Jul 2018 03:20:11 -0700 (PDT) Received: from localhost ([::1]:39374 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1faIPq-0001l5-Er for importer@patchew.org; Tue, 03 Jul 2018 06:20:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43460) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1faIKi-0006lh-Mm for qemu-devel@nongnu.org; Tue, 03 Jul 2018 06:14:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1faIKh-0008Qc-Kb for qemu-devel@nongnu.org; Tue, 03 Jul 2018 06:14:52 -0400 Received: from mail-wr0-x22a.google.com ([2a00:1450:400c:c0c::22a]:38665) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1faIKh-0008Q4-De for qemu-devel@nongnu.org; Tue, 03 Jul 2018 06:14:51 -0400 Received: by mail-wr0-x22a.google.com with SMTP id j33-v6so1363669wrj.5 for ; Tue, 03 Jul 2018 03:14:51 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id c128-v6sm1171208wma.17.2018.07.03.03.14.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Jul 2018 03:14:46 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 055C73E06DE; Tue, 3 Jul 2018 11:14:45 +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=/ajiyM6W2S6tJAn/1lUSMSycGS8GwJG/ZBTtG/HLQ+4=; b=arn5ZCtj5FOEINodn9+Cx0hAGe+kMFkjB12iqbPZKyPgEPUzAF19g9N6rCB3vkIHDE 2f4MiAbgHVAaRBYVJvXF/R0eDzkeFBCZsHxR0SWdcbRFdgsMwanJWBCBtmoWZiv3Nd1S Qota/DhDa0VFgELxtBOD0lgG2IVz6DqjcS6Z0= 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=/ajiyM6W2S6tJAn/1lUSMSycGS8GwJG/ZBTtG/HLQ+4=; b=mCwffahJFhVZpXirUr6i695gLWke7YJxTGlF1g0J297qhYTlIjTzodKyfjETxOf/12 VDWcvxFFkDiWUmWqbqYbG1vgRQzrYV9fC/TcO6OpQznbcUrUghxQAHHh1B8AE2WoqH27 g5KBPtrz53xzIjVmc/jUFR9jastVIR6BneNpIXEXtmPvirjS/I3tmdGaGv7T9EV2uptN EYmJbwW3pEXdcFKcjTcaG3cS2tMuwF50x8rLptKC4OtfyrIXSvXoJbfoeWaPSkXgEouc NT0o7Uwywnr1uKEwCGDiuOFgPGkSuYCoLXvYyUiSafo0X+nJjRpto9eFSN6NtDo6NqJk bQaA== X-Gm-Message-State: APt69E1e4Bv0/RMBrPcfIIsUnTeK9FH3L0ONLkO+OZ+XuMhTB66lKyP8 +dXLkZ1T25sHBZMoH89WXS5rVQ== X-Google-Smtp-Source: AAOMgpcvkcbRtRrxARCY2CO/KUoqAmv12ofMbld3X4BeZ8vrowO4anuM0FOYS1etqSAV3hlm4OxwWQ== X-Received: by 2002:adf:d181:: with SMTP id h1-v6mr21877866wri.198.1530612890409; Tue, 03 Jul 2018 03:14:50 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Tue, 3 Jul 2018 11:14:30 +0100 Message-Id: <20180703101444.23778-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180703101444.23778-1-alex.bennee@linaro.org> References: <20180703101444.23778-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:c0c::22a Subject: [Qemu-devel] [PULL 06/20] 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: agraf@suse.de, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, qemu-devel@nongnu.org, f4bug@amsat.org, cota@braap.org, famz@redhat.com, aurelien@aurel32.net 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 diff --git a/.travis.yml b/.travis.yml index 32188d51f1..95be6ec59f 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/travis/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/MAINTAINERS b/MAINTAINERS index 42a1892d6a..4917b8e48d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2165,6 +2165,7 @@ R: Philippe Mathieu-Daud=C3=A9 L: qemu-devel@nongnu.org S: Maintained F: .travis.yml +F: scripts/travis/ F: .shippable.yml F: tests/docker/ F: tests/vm/ diff --git a/scripts/travis/coverage-summary.sh b/scripts/travis/coverage-s= ummary.sh new file mode 100755 index 0000000000..d7086cf9ca --- /dev/null +++ b/scripts/travis/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