Giter Club home page Giter Club logo

bravecoverage's Introduction

BraveCorage

Code coverage startup for C++ project using GCov and LCov

Build Application

mkdir build && cd build

cmake ..

make

Build Test/Coverage

cd test && mkdir build && cd build

cmake ..

make init

make gcov

make lcov

Software usage

./BraveCoverage --help

--help produce help message

--value_a arg set value a

--value_b arg set value b

--sum execute sum operation

Test Results

Code/Test Coverage Results

Results could be seen in: BraveCoverage/test/build/lcoverage/src/index.html

Screenshot from 2019-12-22 17-26-01

Screenshot from 2019-12-22 17-26-33

Results could be seen in: BraveCoverage/test/build/lcoverage/test/src/index.html

Screenshot from 2019-12-22 17-25-21

Screenshot from 2019-12-22 17-27-28

Extra Information

Google Test Installation

Clone master resource from google github

git clone https://github.com/google/googletest.git GoogleTest/

Install Cmake:

sudo apt-get install cmake

Build master Gtest project by Cmake:

sudo cmake CMakeLists.txt

sudo make

we will get log information:

   Scanning dependencies of target gmock
    [ 14%] Building CXX object CMakeFiles/gmock.dir/home/xpto/FPT/Softs/GoogleTest/googletest/src/gtest-all.cc.o
    [ 28%] Building CXX object CMakeFiles/gmock.dir/src/gmock-all.cc.o
    Linking CXX static library libgmock.a
    [ 28%] Built target gmock
    Scanning dependencies of target gmock_main
    [ 42%] Building CXX object CMakeFiles/gmock_main.dir/home/xpto/FPT/Softs/GoogleTest/googletest/src/gtest-all.cc.o
    [ 57%] Building CXX object CMakeFiles/gmock_main.dir/src/gmock-all.cc.o
    [ 71%] Building CXX object CMakeFiles/gmock_main.dir/src/gmock_main.cc.o
    Linking CXX static library libgmock_main.a
    [ 71%] Built target gmock_main
    Scanning dependencies of target gtest
    [ 85%] Building CXX object gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
    Linking CXX static library libgtest.a
    [ 85%] Built target gtest
    Scanning dependencies of target gtest_main
    [100%] Building CXX object gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o
    Linking CXX static library libgtest_main.a
    [100%] Built target gtest_main
Four static libraries are generate:
libgmock.a  libgmock_main.a  libgtest.a  libgtest_main.a
We need to copy all *.a files to /usr/lib:

sudo cp *.a /usr/lib

sudo cp gtest/*.a /usr/lib

And copy necessary libraries of gmock and gtest to /usr/include

sudo cp -r include/gmock /usr/include/

sudo cp -r ../googletest/include/gtest/ /usr/include/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.