How To Install cppunit on CentOS 8

cppunit is C++ unit testing framework C++ unit testing framework

Introduction

In this tutorial we learn how to install cppunit on CentOS 8.

What is cppunit

CppUnit is the C++ port of the famous JUnit framework for unit testing. Test output is in XML for automatic testing and GUI based for supervised tests. cppunit 1.14.0 4.el8 x86_64 142 k cppunit-1.14.0-4.el8.src.rpm powertools C++ unit testing framework https LGPLv2+ CppUnit is the C++ port of the famous JUnit framework for unit testing. Test output is in XML for automatic testing and GUI based for supervised tests.

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

Install cppunit on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

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

sudo dnf -y install cppunit

Install cppunit on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

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

sudo yum -y install cppunit

How To Uninstall cppunit on CentOS 8

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

sudo dnf remove cppunit

cppunit Package Contents on CentOS 8

/usr/bin/DllPlugInTester
/usr/lib/.build-id
/usr/lib/.build-id/2d
/usr/lib/.build-id/2d/3f5159dae79cb13e234604174356ffa2ec67fc
/usr/lib/.build-id/de
/usr/lib/.build-id/de/0dedda3de63a153a42fc6e76a217fb87b73b19
/usr/lib64/libcppunit-1.14.so.0
/usr/lib64/libcppunit-1.14.so.0.0.0
/usr/share/doc/cppunit
/usr/share/doc/cppunit/AUTHORS
/usr/share/doc/cppunit/BUGS
/usr/share/doc/cppunit/FAQ
/usr/share/doc/cppunit/NEWS
/usr/share/doc/cppunit/README
/usr/share/doc/cppunit/THANKS
/usr/share/doc/cppunit/TODO
/usr/share/licenses/cppunit
/usr/share/licenses/cppunit/COPYING
/usr/bin/DllPlugInTester
/usr/lib/.build-id
/usr/lib/.build-id/31
/usr/lib/.build-id/31/2524c14d48d3d24f11cf57b3714365123e8e2c
/usr/lib/.build-id/f5
/usr/lib/.build-id/f5/313893fe70cd8caf742b1a8f1b129a90c5c141
/usr/lib/libcppunit-1.14.so.0
/usr/lib/libcppunit-1.14.so.0.0.0
/usr/share/doc/cppunit
/usr/share/doc/cppunit/AUTHORS
/usr/share/doc/cppunit/BUGS
/usr/share/doc/cppunit/FAQ
/usr/share/doc/cppunit/NEWS
/usr/share/doc/cppunit/README
/usr/share/doc/cppunit/THANKS
/usr/share/doc/cppunit/TODO
/usr/share/licenses/cppunit
/usr/share/licenses/cppunit/COPYING

References

Summary

In this tutorial we learn how to install cppunit on CentOS 8 using yum and dnf.