Gcov

From ASCEND
Revision as of 03:53, 2 October 2012 by Jpye (talk | contribs) (Created page with "We can do coverage testing of ASCEND using the 'gcov' tool. A GUI for 'gcov' exists, [http://ggcov.sf.net/ '''ggcov'''], see also [http://ggcov.sourceforge.net/docs/ggcov-osd...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

We can do coverage testing of ASCEND using the 'gcov' tool.

A GUI for 'gcov' exists, ggcov, see also this presentation for details.

Build ASCEND using 'scons GCOV=1' and the coverage 'instrumentation' will be added.

To get coverage information in plaintext form, for a single code file, you can use the gcov command, eg

<source lang=sh>

  1. run all this from the top-level working directory

cd ~/ascend

  1. compiler with coverage instrumentation enabled

scons -j4 DEBUG=1 GCOV=1 test solvers models ascend

  1. run the test

test/test solver_qrslv.bug564

  1. process the covereage data

gcov -p ascend/compiler/mergeinst.c --object-directory ascend/compiler

  1. view the results

vim ascend#compiler#merginst.c.gcov <source>

This article is about planned development or proposed functionality. Comments welcome.

Information on the use of ggcov also required here.