svn rev #25495: trunk/doc/rst_source/krb_build/

tsitkova@MIT.EDU tsitkova at MIT.EDU
Wed Nov 30 17:28:43 EST 2011


http://src.mit.edu/fisheye/changelog/krb5/?cs=25495
Commit By: tsitkova
Log Message:
Added Test Coverage topic




Changed Files:
U   trunk/doc/rst_source/krb_build/index.rst
A   trunk/doc/rst_source/krb_build/test_cov.rst
Modified: trunk/doc/rst_source/krb_build/index.rst
===================================================================
--- trunk/doc/rst_source/krb_build/index.rst	2011-11-29 23:11:13 UTC (rev 25494)
+++ trunk/doc/rst_source/krb_build/index.rst	2011-11-30 22:28:43 UTC (rev 25495)
@@ -46,6 +46,7 @@
    doing_build.rst
    options2configure.rst
    osconf.rst
+   test_cov.rst
 
 
 

Added: trunk/doc/rst_source/krb_build/test_cov.rst
===================================================================
--- trunk/doc/rst_source/krb_build/test_cov.rst	                        (rev 0)
+++ trunk/doc/rst_source/krb_build/test_cov.rst	2011-11-30 22:28:43 UTC (rev 25495)
@@ -0,0 +1,33 @@
+
+Test coverage
+=================
+
+It is considered good practice to develop and maintain the test suite with high level 
+of test coverage, i.e. the tests that execute every single statement, every line of the code and
+then validate the result.
+
+The GNU's *gcov* is a tool that analyses the frequency of execution of each line of the code.
+For more details see GNU documentation http://gcc.gnu.org/onlinedocs/gcc/Gcov.html
+
+To invoke *gcov* on *krb5* tree, do *configure* with the following options and run the tests::
+
+    ./configure CFLAGS="-fprofile-arcs -ftest-coverage -O0" LIBS=-lgcov 
+    make
+    make check
+
+It will result into creation of the new helper files with the extentions *gcno* and *gcda*.
+
+To validate the test coverage of the specific file, change the directory to
+its location and run ::
+
+    gcov -o filename.so.gcno filename.c 
+
+To see the test coverage of the *filename.c* open a newly created file *filename.c.gcov* in the editor.
+
+Some recent test coverage result can be found at the http://k5wiki.kerberos.org/wiki/Test_coverage 
+
+
+
+
+
+




More information about the cvs-krb5 mailing list