Gcov
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>
- run all this from the top-level working directory
cd ~/ascend
- compiler with coverage instrumentation enabled
scons -j4 DEBUG=1 GCOV=1 test solvers models ascend
- run the test
test/test solver_qrslv.bug564
- process the covereage data
gcov -p ascend/compiler/mergeinst.c --object-directory ascend/compiler
- 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.