NA-MIC-kit-curriculum/Testing-Based Programming/How to run Code Coverage

From NAMIC Wiki
Revision as of 14:50, 12 December 2009 by Ibanez (talk | contribs) (Created page with '= Introduction = == Overview == This tutorial shows how to run Code Coverage in your project. Code coverage is a mechanism for counting the number of lines of code that are ex…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Home < NA-MIC-kit-curriculum < Testing-Based Programming < How to run Code Coverage

Introduction

Overview

This tutorial shows how to run Code Coverage in your project.

Code coverage is a mechanism for counting the number of lines of code that are exercised during the execution of your tests.

Prerequisite

You should read first the tutorial:

You should also have installed the package

 gcov

this is usually installed along with your gcc package

Configuring the Test

In the project that you built in the previous tutorial, do

 cd ${BINARY_DIR}
 make edit_cache
 

then search for the variable

 CMAKE_BUILD_TYPE

and set it to the word "Debug"