Example of installing googletest on Ubuntu 17.04 LTS using the command sudo apt-get install googletest.
Ads
Quick installation of googletest:
Step 1: Update system:
sudo apt-get update
Step 2: Install: googletest
Ater updaing the OS run following command to install the packae:
sudo apt-get install googletest
Package Details | |
| Package: | googletest |
| Version: | 1.8.0-5 |
| Maintainer: | Ubuntu Developers |
| Home page: | https://github.com/google/googletest |
| Description: | Google's C++ test framework This package combines formerly-separate Google Test and Google Mock. . Google Test is a framework for writing C++ tests on a variety of platforms. Based on the xUnit architecture. Supports automatic test discovery, a rich set of assertions, user-defined assertions, death tests, fatal and non-fatal failures, value- and type-parameterized tests, various options for running the tests, and XML test report generation. . Google Mock is an extension of Google Test for C++ mocking. Inspired by jMock, EasyMock, and Hamcrest, and designed with C++'s specifics in mind, it can help you derive better designs of your system and write better tests. . Google Mock: . - provides a declarative syntax for defining mocks, - can easily define partial (hybrid) mocks, which are a cross of real and mock objects, - handles functions of arbitrary types and overloaded functions, - comes with a rich set of matchers for validating function arguments, - uses an intuitive syntax for controlling the behavior of a mock, - does automatic verification of expectations (no record-and-replay needed), - allows arbitrary (partial) ordering constraints on function calls to be expressed, - lets a user extend it by defining new matchers and actions. - does not use exceptions, and - is easy to learn and use. . NOTE: This package does not contain a library to link against, but rather the source code to build the google test library; this is because the google test library must be built with the same flags as the C++ code under test. |
| Distro: | Ubuntu 17.04 |
| Release: | |
| Repo/Section: | universe/libdevel |
First of all update your system with the command:
sudo apt-get update
Ads
Above command will download the package lists for Ubuntu 17.04 on your system. This will update the list of newest versions of packages and its dependencies on your system.
After downloading the latest package list with the help of above you can run the installation process.
If googletest is not installed on your compter then the command 'dpkg -L googletest' will give followin error.
deepak@deepak-VirtualBox:~$ dpkg -L googletest dpkg-query: package 'googletest' is not installed Use dpkg --info (= dpkg-deb --info) to examine archive files, and dpkg --contents (= dpkg-deb --contents) to list their contents. deepak@deepak-VirtualBox:~$
Installing googletest:
After system update use the following command to install googletest:
sudo apt-get install googletest
Above command will confirm before installing the package on your Ubuntu 17.04 Operating System. If you are not already logged in as su, installer will ask you the root password. After completion of the installation you can use the package on your system.
Now we will see the commands for uninstalling the googletest from Ubuntu 17.04. For uninstalling this package you can easily use the apt command and remove the package from Linux Operating System.
To remove the googletest following command is used:
sudo apt-get remove googletest
Following command is used to remove the googletest package along with its dependencies:
sudo apt-get remove --auto-remove googletest
This will remove googletest and all its dependent packages which is no longer needed in the system.
Completely removing googletest with all configuration files:
Following command should be used with care as it deletes all the configuration files and data:
sudo apt-get purge googletest
or you can use following command also:
sudo apt-get purge --auto-remove googletest
Above command will remove all the configuration files and data associated with googletest package. You can can't recover the delete data, so, use this command with care.