From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5E1F0A04F1; Sun, 24 May 2020 23:23:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2BF4A1D548; Sun, 24 May 2020 23:23:02 +0200 (CEST) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by dpdk.org (Postfix) with ESMTP id 861A01D547 for ; Sun, 24 May 2020 23:23:00 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 745FE7B7; Sun, 24 May 2020 17:22:59 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Sun, 24 May 2020 17:22:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm1; bh= eGiylFwGkoXlWlh2J+XWeIy5Sk8rC+UMOoUGEbL2uH4=; b=g0YXVlVefK6N0QD5 5cKbnq12V+ruyndyWreMN6Gx0j8vp/nYFsjP29TmtF7USvIiYi4ejXWkP1vpEIww hVktILqB3ghkdamD3bXLXJ+whruInXeywuYbF0IshZpf2kvB8jw/sv3GOvGrVWIk kMEpIUKq5ztJHwLD3Z3FDTnSKxkr50I3LXInzBIv5RKia2UHe6bsE9uLyoUjy9wf 65xgOvGuouE4uyFddHKESqu7k1FRgHCgZdK39Uqy71SIGUVo5NrjyRhXqFizZO9X 23iZCg/YU36BhiDUMvFrHEiHBdcYQj2+cxhofNCYel8DRBfxhhZ8VdpM4A15ciyH wecHfg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :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=eGiylFwGkoXlWlh2J+XWeIy5Sk8rC+UMOoUGEbL2u H4=; b=e7NnAksdrE0H43hFH8OD6ZifVrpd8a20mExaG6mSHokNmhpUFv61gzybl 6ZMKNo+vSursUsTJToZBJfg0YuSjM49V2+FnWh6w0YUf6sIqBVys7Tr/VLfJ976i oEyKtV6/CRMwM2QVoiDmq6f8aSeosjNT/jZAQ4hsQELO0y58/BIcQ4Kemyrr4M5v nDWLVDIUN5v18RuiKtCRFuFEpiVfdS074w+vihRnGaUOq0E6Sg38hKwzUuMaP9TO n7k8FiKIl2pRxrKQOwv7wnYkO++FFWPyewSWy3eiNwLuUa2mdGqtho34bDGIPYLQ Aqe/95JB9wvKrZjDsTRHbddl85PoQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddukedgudehlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdej ueeiiedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgr lhhonhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 40AFC328005D; Sun, 24 May 2020 17:22:58 -0400 (EDT) From: Thomas Monjalon To: Marcin Zapolski Cc: dev@dpdk.org, john.mcnamara@intel.com, marko.kovacevic@intel.com Date: Sun, 24 May 2020 23:22:57 +0200 Message-ID: <5114883.9lh0I85yue@thomas> In-Reply-To: <20190923121533.1191-1-marcinx.a.zapolski@intel.com> References: <20190923085226.1009-1-marcinx.a.zapolski@intel.com> <20190923121533.1191-1-marcinx.a.zapolski@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2] doc: add code coverage report generation guide X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" What is the status of this patch? There was no review. 23/09/2019 14:15, Marcin Zapolski: > Add unit tests and code coverage reports generation guides to Meson > build documentation. > > Signed-off-by: Marcin Zapolski > --- > v2: fix trailing whitespaces > --- > doc/build-sdk-meson.txt | 40 ++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 40 insertions(+) > > diff --git a/doc/build-sdk-meson.txt b/doc/build-sdk-meson.txt > index fc7fe37b5..691950a62 100644 > --- a/doc/build-sdk-meson.txt > +++ b/doc/build-sdk-meson.txt > @@ -192,3 +192,43 @@ From examples/helloworld/Makefile:: > > build: > @mkdir -p $@ > + > +Running DPDK unit-tests > +----------------------- > + > +To run all defined unit tests we can use the command:: > + > + meson test -C build > + > +from DPDK root direcotry, where build is the project build directory. It is the > +equivalent to running:: > + > + ninja test > + > +in ``build`` directory. > +To run a set of tests belonging to a specific test suite, we can use:: > + > + meson test -C build --suite > + > +where can be ``fast-tests``, ``perf-tests``, ``driver-tests`` or > +``debug-tests``. > + > +Generating code coverage reports > +-------------------------------- > + > +To gather code coverage data, we need to give meson the ``-Db_coverage=true`` > +command line flag:: > + > + meson configure -Db_coverage=true > + > +To generate code coverage reports, the ``gcovr`` tool needs to be installed. On > +most linux distributions it is available through the package manager, eg. > +``sudo apt-get install gcovr``. > +Then, after running the tests, we can generate the reports simply by running:: > + > + ninja coverage > + > +in project build directory. The reports will be generated in > +``build/meson-logs`` directory, in ``html``, ``xml`` and ``txt`` formats. > +To generate the coverage reports in only one format, we can use one of > +``coverage-html``, ``coverage-xml`` or ``coverage-txt`` meson targets.