How To Install CUnit on Fedora 34

CUnit is Unit testing framework for C Unit testing framework for C

Introduction

In this tutorial we learn how to install CUnit on Fedora 34.

What is CUnit

CUnit is a lightweight system for writing, administering, and running unit tests in C. It provides C programmers a basic testing functionality with a flexible variety of user interfaces. CUnit 2.1.3 23.fc34 x86_64 53 k CUnit-2.1.3-23.fc34.src.rpm fedora Unit testing framework for C http LGPLv2+ CUnit is a lightweight system for writing, administering, and running unit tests in C. It provides C programmers a basic testing functionality with a flexible variety of user interfaces.

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

Install CUnit on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

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

sudo dnf -y install CUnit

Install CUnit on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

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

sudo yum -y install CUnit

How To Uninstall CUnit on Fedora 34

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

sudo dnf remove CUnit

CUnit Package Contents on Fedora 34

/usr/lib/.build-id
/usr/lib/.build-id/71
/usr/lib/.build-id/71/17a8d4fadaccaa6666570a9aeefe6c3a97f5ef
/usr/lib/libcunit.so.1
/usr/lib/libcunit.so.1.0.1
/usr/share/CUnit
/usr/share/CUnit/CUnit-List.dtd
/usr/share/CUnit/CUnit-List.xsl
/usr/share/CUnit/CUnit-Run.dtd
/usr/share/CUnit/CUnit-Run.xsl
/usr/share/CUnit/Memory-Dump.dtd
/usr/share/CUnit/Memory-Dump.xsl
/usr/share/doc/CUnit
/usr/share/doc/CUnit/AUTHORS
/usr/share/doc/CUnit/COPYING
/usr/share/doc/CUnit/ChangeLog
/usr/share/doc/CUnit/NEWS
/usr/share/doc/CUnit/README
/usr/share/doc/CUnit/TODO
/usr/share/doc/CUnit/VERSION
/usr/lib/.build-id
/usr/lib/.build-id/79
/usr/lib/.build-id/79/3dd37190e3ee7bd68b09706c2216e954d76bf7
/usr/lib64/libcunit.so.1
/usr/lib64/libcunit.so.1.0.1
/usr/share/CUnit
/usr/share/CUnit/CUnit-List.dtd
/usr/share/CUnit/CUnit-List.xsl
/usr/share/CUnit/CUnit-Run.dtd
/usr/share/CUnit/CUnit-Run.xsl
/usr/share/CUnit/Memory-Dump.dtd
/usr/share/CUnit/Memory-Dump.xsl
/usr/share/doc/CUnit
/usr/share/doc/CUnit/AUTHORS
/usr/share/doc/CUnit/COPYING
/usr/share/doc/CUnit/ChangeLog
/usr/share/doc/CUnit/NEWS
/usr/share/doc/CUnit/README
/usr/share/doc/CUnit/TODO
/usr/share/doc/CUnit/VERSION

References

Summary

In this tutorial we learn how to install CUnit on Fedora 34 using yum and dnf.