5 The @code{sb-cover} module provides a code coverage tool for SBCL. The
6 tool has support for expression coverage, and for some branch coverage.
7 Coverage reports are only generated for code compiled using
8 @code{compile-file} with the value of the
9 @code{sb-cover:store-coverage-data} optimization quality set to 3.
11 As of SBCL 1.0.6 @code{sb-cover} is still experimental, and the
12 interfaces documented here might change in later versions.
14 @subsection Example Usage
20 ;;; Turn on generation of code coverage instrumentation in the compiler
21 (declaim (optimize sb-cover:store-coverage-data))
23 ;;; Load some code, ensuring that it's recompiled with the new optimization
25 (asdf:oos 'asdf:load-op :cl-ppcre-test :force t)
27 ;;; Run the test suite.
30 ;;; Produce a coverage report
31 (sb-cover:report "/tmp/report/")
33 ;;; Turn off instrumentation
34 (declaim (optimize (sb-cover:store-coverage-data 0)))
38 @c Write some documentation about how to interpret the results
42 @include fun-sb-cover-report.texinfo
44 @include fun-sb-cover-reset-coverage.texinfo
46 @include fun-sb-cover-clear-coverage.texinfo
48 @include fun-sb-cover-save-coverage.texinfo
50 @include fun-sb-cover-save-coverage-in-file.texinfo
52 @include fun-sb-cover-restore-coverage.texinfo
54 @include fun-sb-cover-restore-coverage-from-file.texinfo