From 022bc635ef40827e778e08ee27cb8f16bf28c90b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 2 Jan 2005 23:48:07 +0000 Subject: r4493: change name of README.gcov so it doesn't get deleted by "make clean" :-) (This used to be commit 209ba7b889823f1badb0337412b2b9b34c5e23de) --- source4/lib/ldb/README.gcov | 33 --------------------------------- source4/lib/ldb/README_gcov.txt | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 33 deletions(-) delete mode 100644 source4/lib/ldb/README.gcov create mode 100644 source4/lib/ldb/README_gcov.txt (limited to 'source4/lib') diff --git a/source4/lib/ldb/README.gcov b/source4/lib/ldb/README.gcov deleted file mode 100644 index 02f090f69f..0000000000 --- a/source4/lib/ldb/README.gcov +++ /dev/null @@ -1,33 +0,0 @@ -Here is how to use gcov to test code coverage in ldb. - -Step 1: enable gcov support - - Edit Makefile.ldb and uncommend the two GCOV_ lines - -Step 2: build ldb - - make -sf Makefile.ldb clean all - -Step 3: run the test suite - make -sf Makefile.ldb test-tdb - -Step 4: produce the gcov report - make -sf Makefile.ldb gcov - -Step 5: read the summary reports - less *.report.gcov - -Step 6: examine the per-file reports - less ldb_tdb\#ldb_tdb.c.gcov - -You can also combine steps 2 to 4 like this: - - make -sf Makefile.ldb clean all test-tdb gcov - -Note that you should not expect 100% coverage, as some error paths -(such as memory allocation failures) are verr hard to trigger. There -are ways of working around this, but they are quite tricky (they -involve allocation wrappers that "fork and fail on malloc"). - -The lines to look for in the per-file reports are the ones starting -with "#####". Those are lines that are never executed. diff --git a/source4/lib/ldb/README_gcov.txt b/source4/lib/ldb/README_gcov.txt new file mode 100644 index 0000000000..02f090f69f --- /dev/null +++ b/source4/lib/ldb/README_gcov.txt @@ -0,0 +1,33 @@ +Here is how to use gcov to test code coverage in ldb. + +Step 1: enable gcov support + + Edit Makefile.ldb and uncommend the two GCOV_ lines + +Step 2: build ldb + + make -sf Makefile.ldb clean all + +Step 3: run the test suite + make -sf Makefile.ldb test-tdb + +Step 4: produce the gcov report + make -sf Makefile.ldb gcov + +Step 5: read the summary reports + less *.report.gcov + +Step 6: examine the per-file reports + less ldb_tdb\#ldb_tdb.c.gcov + +You can also combine steps 2 to 4 like this: + + make -sf Makefile.ldb clean all test-tdb gcov + +Note that you should not expect 100% coverage, as some error paths +(such as memory allocation failures) are verr hard to trigger. There +are ways of working around this, but they are quite tricky (they +involve allocation wrappers that "fork and fail on malloc"). + +The lines to look for in the per-file reports are the ones starting +with "#####". Those are lines that are never executed. -- cgit