diff options
author | Zhanna Tsitkov <tsitkova@mit.edu> | 2011-11-30 22:28:43 +0000 |
---|---|---|
committer | Zhanna Tsitkov <tsitkova@mit.edu> | 2011-11-30 22:28:43 +0000 |
commit | 6c21de0c0c0b31525642be0a2f19ad19c09affa4 (patch) | |
tree | e3f5af2cb4ef00f27ad5f663a63754a881b60601 /doc | |
parent | 386dd381290cbf7f02c0a238701c5f0b783d3418 (diff) | |
download | krb5-6c21de0c0c0b31525642be0a2f19ad19c09affa4.tar.gz krb5-6c21de0c0c0b31525642be0a2f19ad19c09affa4.tar.xz krb5-6c21de0c0c0b31525642be0a2f19ad19c09affa4.zip |
Added Test Coverage topic
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25495 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'doc')
-rw-r--r-- | doc/rst_source/krb_build/index.rst | 1 | ||||
-rw-r--r-- | doc/rst_source/krb_build/test_cov.rst | 33 |
2 files changed, 34 insertions, 0 deletions
diff --git a/doc/rst_source/krb_build/index.rst b/doc/rst_source/krb_build/index.rst index 2de23864e0..43d3fc2a13 100644 --- a/doc/rst_source/krb_build/index.rst +++ b/doc/rst_source/krb_build/index.rst @@ -46,6 +46,7 @@ Contents: doing_build.rst options2configure.rst osconf.rst + test_cov.rst diff --git a/doc/rst_source/krb_build/test_cov.rst b/doc/rst_source/krb_build/test_cov.rst new file mode 100644 index 0000000000..02769fcb6a --- /dev/null +++ b/doc/rst_source/krb_build/test_cov.rst @@ -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 + + + + + + |