Skip to content

C/C++ library for Diagnostics over IP (DoIP)

Notifications You must be signed in to change notification settings

hominlinx/libdoip

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libdoip

C/C++ library for Diagnostics over IP (DoIP)

Installing Google Test Framework

In order to compile the unit tests, the Google Test Framework is required to be installed on the system.

  1. Install the default libgtest-dev package with:
sudo apt-get install libgtest-dev
  1. Enter the directory in the bash of the installed package which is by default /usr/src/gtest and execute:
sudo cmake CMakeLists.txt

If this command finish successfully, build the static libraries with:

sudo make
  1. If the previous step was successfully, you should have libgtest.a and libgtest_main.a in the gtest directory. Copy the libraries into the /usr/lib directory with:
sudo cp libgtest.a /usr/lib

and

sudo cp libgtest_main.a /usr/lib
  1. The Google Test Framework is now ready to use to compile tests.
Test if Google Test Framework works

This section will change as soon the Makefile is ready to use with the project.

  1. Assuming you have a .cpp file with the main method and a simple test you can compile the test file with:
g++ -o testRun testFile.cpp -g -L/usr/lib/ -lgtest -lgtest_main -lpthread

If this finish successfully you should have a executable called testRun in the directory.

  1. To execute the test and receive a xml file type:
./testRun --gtest_output="xml:./testOutput.xml"

About

C/C++ library for Diagnostics over IP (DoIP)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 89.6%
  • C 5.4%
  • Makefile 5.0%