From patchwork Thu Feb 21 06:28:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 1045782 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 444l4D5dlLz9s6w for ; Thu, 21 Feb 2019 17:31:40 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=aj.id.au Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.b="P2Xp8Tf+"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="GovIlzTz"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 444l4D4XLDzDqNJ for ; Thu, 21 Feb 2019 17:31:40 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=aj.id.au (client-ip=66.111.4.26; helo=out2-smtp.messagingengine.com; envelope-from=andrew@aj.id.au; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=aj.id.au Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.b="P2Xp8Tf+"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="GovIlzTz"; dkim-atps=neutral Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 444l1W5VGmzDqMH for ; Thu, 21 Feb 2019 17:29:19 +1100 (AEDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 5AD5B21E5A; Thu, 21 Feb 2019 01:29:17 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 21 Feb 2019 01:29:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=QZQXk4fWjO+JN rwHeyBnjDdDnD5feye61A3qcrBbcFI=; b=P2Xp8Tf+vHqdPwCrHqATXBsw8ISLP 6emLz9QGKBXJWEoQnEwMiQzpl4o+sgY9qXKnY/i40vTOsruKXsps652FYwgAtLLj cKx62I0FffW4Xig4P7W9xLtHaTfCdYM8PNrtPZeJiMjvHaknTiIHbAaYW4FdyI9J RfNJU3Q9c3In/U5KHVRFsPU0og9XS85v+GzrMf7tL2euwGMb2w79vbFKU1pHPVWM xm56tg87qv41c9MBFKrmgzu04851gpfIC90PW7VjrJtwrJ2+Da92XghvdvdAwlXq nFOXdzb+/f9Dl9AxbrzAQvCIUu9LW4NRlPWHD4psTso3avneeZuBDK8HQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=QZQXk4fWjO+JNrwHeyBnjDdDnD5feye61A3qcrBbcFI=; b=GovIlzTz xjH6mqZJXlrZ57+/t4QOfUGAWGt/PR8myJqvEPhuF6RLU24ZmqaM5HfAr530unXg tuQ4GhIXkeUCYxY6VbceWHwLC3rzQxZVHOfhcT1tLnr85symaBl+G+Hqz+mnYaFM 9+du5dUKhY8efIWNOebzcwkP9cGt1e+VNtbIldxg7NqSnIcnqW4YhKAIES3RupYT yTdqBPkOnRG9UFK3O7C0eeuU8ISfxTVmIlL1qd7t7OhDnI18UfKmb+Ea6KA3Shso 1oYdD8+wUJytR+hHSv2SlkCJkh36VwKNSsYA7K9pG35n2JWaIFRkuCASTLcpMLVJ 80wGd7+VdXo4Hg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrtdejgdeljeculddtuddrgedtledrtddtmd cutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomheptehnughrvgifucflvghffhgvrhihuceorghnughrvgifsegr jhdrihgurdgruheqnecukfhppedvtddvrdekuddrudekrddvkeenucfrrghrrghmpehmrg hilhhfrhhomheprghnughrvgifsegrjhdrihgurdgruhenucevlhhushhtvghrufhiiigv pedu X-ME-Proxy: Received: from mistburn.bha-au.ibmmobiledemo.com (unknown [202.81.18.28]) by mail.messagingengine.com (Postfix) with ESMTPA id 6767BE419A; Thu, 21 Feb 2019 01:29:15 -0500 (EST) From: Andrew Jeffery To: skiboot@lists.ozlabs.org Date: Thu, 21 Feb 2019 16:58:04 +1030 Message-Id: <20190221062851.21958-6-andrew@aj.id.au> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190221062851.21958-1-andrew@aj.id.au> References: <20190221062851.21958-1-andrew@aj.id.au> MIME-Version: 1.0 Subject: [Skiboot] [PATCH v2 05/52] Makefile: Paper over gard and pflash coverage issues X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jeffery Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" `make coverage-report` gave the following error: (cd external/pflash; lcov -q -c -d . -o pflash.info --rc lcov_branch_coverage=1; sed -i -e 's%external/pflash/libflash%libflash%; s%external/pflash/ccan%ccan%' pflash.info) (cd external/gard; lcov -q -c -d . -o gard.info --rc lcov_branch_coverage=1; sed -i -e 's%external/gard/libflash%libflash%; s%external/gard/ccan%ccan%' gard.info) geninfo: WARNING: no .gcda files found in . - skipping! geninfo: WARNING: no .gcda files found in . - skipping! lcov -q -c -d . -d ccan/check_type/test/ -d ccan/str/test/ -d ccan/str/test/ -d ccan/list/test/ -d ccan/list/test/ -d ccan/list/test/ -d ccan/list/test/ -d ccan/list/test/ -d ccan/build_assert/test/ -d ccan/short_types/test/ -d ccan/short_types/test/ -d ccan/array_size/test/ -d ccan/container_of/test/ -d ccan/endian/test/ -d libc/test/ -d libc/test/ -d libc/test/ -d libc/test/ -o skiboot.info --rc lcov_branch_coverage=1 lcov -q -r skiboot.info 'external/pflash/*' -o skiboot.info lcov -q -r skiboot.info 'external/gard/*' -o skiboot.info lcov -q -a skiboot.info -a external/pflash/pflash.info -o skiboot.info lcov: ERROR: no valid records found in tracefile external/pflash/pflash.info make: *** [/home/andrew/src/open-power/skiboot/Makefile.main:315: skiboot.info] Error 255 And similar again for the gard tool. We should really untangle the build strategy for tools in external/, but in the mean time paper over the problem of generating the lcov output at the top level by ensuring we have a means to generate the necessary gcda files for lcov to consume. Signed-off-by: Andrew Jeffery --- Makefile.main | 8 ++++++++ external/gard/Makefile | 4 ++++ external/pflash/Makefile | 4 ++++ 3 files changed, 16 insertions(+) diff --git a/Makefile.main b/Makefile.main index 15c906752f6d..096a58d56986 100644 --- a/Makefile.main +++ b/Makefile.main @@ -225,9 +225,17 @@ include $(SRC)/libstb/Makefile.inc gard: (cd external/gard; CROSS_COMPILE="" CFLAGS="$(HOSTCFLAGS) $(HOSTGCOVCFLAGS)" make) +coverage: gard-coverage +gard-coverage: + (cd external/gard; CROSS_COMPILE="" CFLAGS="$(HOSTCFLAGS) $(HOSTGCOVCFLAGS)" make coverage) + pflash: (cd external/pflash; CROSS_COMPILE="" CFLAGS="$(HOSTCFLAGS) $(HOSTGCOVCFLAGS)" make) +coverage: pflash-coverage +pflash-coverage: + (cd external/pflash; CROSS_COMPILE="" CFLAGS="$(HOSTCFLAGS) $(HOSTGCOVCFLAGS)" make coverage) + pflash-coverity: (cd external/pflash; ./build-all-arch.sh) diff --git a/external/gard/Makefile b/external/gard/Makefile index 2ccd1440df6b..50589cf482cd 100644 --- a/external/gard/Makefile +++ b/external/gard/Makefile @@ -5,6 +5,10 @@ include ../../external/common/rules.mk all: links arch_links $(EXE) +.PHONY: coverage +coverage: CFLAGS += -fprofile-arcs -ftest-coverage +coverage: check + #Rebuild version.o so that the the version always matches #what the test suite will get from ./make_version.sh check: version.o all diff --git a/external/pflash/Makefile b/external/pflash/Makefile index 5395bdfa533b..243de6ee0670 100644 --- a/external/pflash/Makefile +++ b/external/pflash/Makefile @@ -4,6 +4,10 @@ include ../../external/common/rules.mk all: links arch_links $(EXE) +.PHONY: coverage +coverage: CFLAGS += -fprofile-arcs -ftest-coverage +coverage: check + #Rebuild version.o so that the the version always matches #what the test suite will get from ./make_version.sh check: version.o all