Code Coverage

The wiki is being retired!

Documentation is now handled by the same processes we use for code: Add something to the Documentation/ directory in the coreboot repo, and it will be rendered to https://doc.coreboot.org/. Contributions welcome!

Prerequisites

You need

Getting started

--- bin/geninfo	2012-11-13 01:58:53.000000000 -0800
+++ bin/geninfo	2013-01-08 16:44:48.041362229 -0800
@@ -1871,7 +1871,7 @@
 	close(GCOV_PIPE);
 
 	$result = 0;
-	if ($version_string =~ /(\d+)\.(\d+)(\.(\d+))?/)
+	if ($version_string =~ /(\d+)\.(\d+)(\.(\d+))$/)
 	{
 		if (defined($4))
 		{

Getting code coverage information

$ sudo ./cbmem -CV
$ lcov --capture --directory $( pwd ) --output-file coreboot.info --gcov-tool i386-elf-gcov
$ genhtml coreboot.info --output-directory coreboot-coverage

Demo

http://www.coreboot.org/~stepan/coreboot-coverage/

See Also