How To Install gcovr on Fedora 36

In this tutorial we learn how to install gcovr in Fedora 36. gcovr is A code coverage report generator using GNU gcov

Introduction

In this tutorial we learn how to install gcovr on Fedora 36.

What is gcovr

Gcovr provides a utility for managing the use of the GNU gcov utility and generating summarized code coverage results. This command is inspired by the Python coverage.py package, which provides a similar utility in Python. The gcovr command produces either compact human-readable summary reports, machine readable XML reports (in Cobertura format) or simple HTML reports. Thus, gcovr can be viewed as a command-line alternative to the lcov utility, which runs gcov and generates an HTML-formatted report.

We can use yum or dnf to install gcovr on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install gcovr.

Install gcovr on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install gcovr using dnf by running the following command:

sudo dnf -y install gcovr

Install gcovr on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install gcovr using yum by running the following command:

sudo yum -y install gcovr

How To Uninstall gcovr on Fedora 36

To uninstall only the gcovr package we can use the following command:

sudo dnf remove gcovr

gcovr Package Contents on Fedora 36

/usr/bin/gcovr
/usr/lib/python3.10/site-packages/gcovr
/usr/lib/python3.10/site-packages/gcovr-5.0-py3.10.egg-info
/usr/lib/python3.10/site-packages/gcovr-5.0-py3.10.egg-info/PKG-INFO
/usr/lib/python3.10/site-packages/gcovr-5.0-py3.10.egg-info/SOURCES.txt
/usr/lib/python3.10/site-packages/gcovr-5.0-py3.10.egg-info/dependency_links.txt
/usr/lib/python3.10/site-packages/gcovr-5.0-py3.10.egg-info/entry_points.txt
/usr/lib/python3.10/site-packages/gcovr-5.0-py3.10.egg-info/requires.txt
/usr/lib/python3.10/site-packages/gcovr-5.0-py3.10.egg-info/top_level.txt
/usr/lib/python3.10/site-packages/gcovr/__init__.py
/usr/lib/python3.10/site-packages/gcovr/__main__.py
/usr/lib/python3.10/site-packages/gcovr/__pycache__
/usr/lib/python3.10/site-packages/gcovr/__pycache__/__init__.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/gcovr/__pycache__/__init__.cpython-310.pyc
/usr/lib/python3.10/site-packages/gcovr/__pycache__/__main__.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/gcovr/__pycache__/__main__.cpython-310.pyc
/usr/lib/python3.10/site-packages/gcovr/__pycache__/configuration.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/gcovr/__pycache__/configuration.cpython-310.pyc
/usr/lib/python3.10/site-packages/gcovr/__pycache__/coverage.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/gcovr/__pycache__/coverage.cpython-310.pyc
/usr/lib/python3.10/site-packages/gcovr/__pycache__/gcov.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/gcovr/__pycache__/gcov.cpython-310.pyc
/usr/lib/python3.10/site-packages/gcovr/__pycache__/utils.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/gcovr/__pycache__/utils.cpython-310.pyc
/usr/lib/python3.10/site-packages/gcovr/__pycache__/version.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/gcovr/__pycache__/version.cpython-310.pyc
/usr/lib/python3.10/site-packages/gcovr/__pycache__/workers.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/gcovr/__pycache__/workers.cpython-310.pyc
/usr/lib/python3.10/site-packages/gcovr/configuration.py
/usr/lib/python3.10/site-packages/gcovr/coverage.py
/usr/lib/python3.10/site-packages/gcovr/gcov.py
/usr/lib/python3.10/site-packages/gcovr/templates
/usr/lib/python3.10/site-packages/gcovr/templates/base.html
/usr/lib/python3.10/site-packages/gcovr/templates/root_page.html
/usr/lib/python3.10/site-packages/gcovr/templates/source_page.html
/usr/lib/python3.10/site-packages/gcovr/templates/style.css
/usr/lib/python3.10/site-packages/gcovr/templates/style.details.css
/usr/lib/python3.10/site-packages/gcovr/templates/style.filelist.css
/usr/lib/python3.10/site-packages/gcovr/templates/style.meter.css
/usr/lib/python3.10/site-packages/gcovr/templates/style.summary.css
/usr/lib/python3.10/site-packages/gcovr/utils.py
/usr/lib/python3.10/site-packages/gcovr/version.py
/usr/lib/python3.10/site-packages/gcovr/workers.py
/usr/lib/python3.10/site-packages/gcovr/writer
/usr/lib/python3.10/site-packages/gcovr/writer/__init__.py
/usr/lib/python3.10/site-packages/gcovr/writer/__pycache__
/usr/lib/python3.10/site-packages/gcovr/writer/__pycache__/__init__.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/gcovr/writer/__pycache__/__init__.cpython-310.pyc
/usr/lib/python3.10/site-packages/gcovr/writer/__pycache__/cobertura.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/gcovr/writer/__pycache__/cobertura.cpython-310.pyc
/usr/lib/python3.10/site-packages/gcovr/writer/__pycache__/coveralls.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/gcovr/writer/__pycache__/coveralls.cpython-310.pyc
/usr/lib/python3.10/site-packages/gcovr/writer/__pycache__/csv.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/gcovr/writer/__pycache__/csv.cpython-310.pyc
/usr/lib/python3.10/site-packages/gcovr/writer/__pycache__/html.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/gcovr/writer/__pycache__/html.cpython-310.pyc
/usr/lib/python3.10/site-packages/gcovr/writer/__pycache__/json.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/gcovr/writer/__pycache__/json.cpython-310.pyc
/usr/lib/python3.10/site-packages/gcovr/writer/__pycache__/sonarqube.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/gcovr/writer/__pycache__/sonarqube.cpython-310.pyc
/usr/lib/python3.10/site-packages/gcovr/writer/__pycache__/summary.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/gcovr/writer/__pycache__/summary.cpython-310.pyc
/usr/lib/python3.10/site-packages/gcovr/writer/__pycache__/txt.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/gcovr/writer/__pycache__/txt.cpython-310.pyc
/usr/lib/python3.10/site-packages/gcovr/writer/cobertura.py
/usr/lib/python3.10/site-packages/gcovr/writer/coveralls.py
/usr/lib/python3.10/site-packages/gcovr/writer/csv.py
/usr/lib/python3.10/site-packages/gcovr/writer/html.py
/usr/lib/python3.10/site-packages/gcovr/writer/json.py
/usr/lib/python3.10/site-packages/gcovr/writer/sonarqube.py
/usr/lib/python3.10/site-packages/gcovr/writer/summary.py
/usr/lib/python3.10/site-packages/gcovr/writer/txt.py
/usr/share/doc/gcovr
/usr/share/doc/gcovr/CHANGELOG.rst
/usr/share/doc/gcovr/README.rst
/usr/share/licenses/gcovr
/usr/share/licenses/gcovr/LICENSE.txt
/usr/share/man/man1/gcovr.1.gz

References

Summary

In this tutorial we learn how to install gcovr on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).