DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] doc: add code coverage report generation guide
@ 2019-09-23  8:52 Marcin Zapolski
  2019-09-23 12:15 ` [dpdk-dev] [PATCH v2] " Marcin Zapolski
  0 siblings, 1 reply; 4+ messages in thread
From: Marcin Zapolski @ 2019-09-23  8:52 UTC (permalink / raw)
  To: dev; +Cc: Marcin Zapolski

Add unit tests and code coverage reports generation guides to Meson
build documentation.

Signed-off-by: Marcin Zapolski <marcinx.a.zapolski@intel.com>
---
 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..644d1a27b 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 <test-suite>
+
+where <test-suite> 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.
-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH v2] doc: add code coverage report generation guide
  2019-09-23  8:52 [dpdk-dev] [PATCH] doc: add code coverage report generation guide Marcin Zapolski
@ 2019-09-23 12:15 ` Marcin Zapolski
  2020-05-24 21:22   ` Thomas Monjalon
  0 siblings, 1 reply; 4+ messages in thread
From: Marcin Zapolski @ 2019-09-23 12:15 UTC (permalink / raw)
  To: dev; +Cc: Marcin Zapolski

Add unit tests and code coverage reports generation guides to Meson
build documentation.

Signed-off-by: Marcin Zapolski <marcinx.a.zapolski@intel.com>
---
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 <test-suite>
+
+where <test-suite> 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.
-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH v2] doc: add code coverage report generation guide
  2019-09-23 12:15 ` [dpdk-dev] [PATCH v2] " Marcin Zapolski
@ 2020-05-24 21:22   ` Thomas Monjalon
  2023-06-12 16:07     ` Stephen Hemminger
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Monjalon @ 2020-05-24 21:22 UTC (permalink / raw)
  To: Marcin Zapolski; +Cc: dev, john.mcnamara, marko.kovacevic

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 <marcinx.a.zapolski@intel.com>
> ---
> 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 <test-suite>
> +
> +where <test-suite> 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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH v2] doc: add code coverage report generation guide
  2020-05-24 21:22   ` Thomas Monjalon
@ 2023-06-12 16:07     ` Stephen Hemminger
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2023-06-12 16:07 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Marcin Zapolski, dev, john.mcnamara, marko.kovacevic

On Sun, 24 May 2020 23:22:57 +0200
Thomas Monjalon <thomas@monjalon.net> wrote:

> What is the status of this patch?
> There was no review.

Running unit tests was added to prog_guide documentation later.
This patch is no longer relevant.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-06-12 16:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-23  8:52 [dpdk-dev] [PATCH] doc: add code coverage report generation guide Marcin Zapolski
2019-09-23 12:15 ` [dpdk-dev] [PATCH v2] " Marcin Zapolski
2020-05-24 21:22   ` Thomas Monjalon
2023-06-12 16:07     ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).