On 11 May 2011 03:00, Sean Bryant <sean@...> wrote:
> I'm running into trouble trying to generate coverage reports (using
> sb-cover, obviously) for a specific package in my project.
(defun call-with-coverage (thunk system)
;; Make sure it's dependencies are OK.
(:policy `(optimize sb-cover:store-coverage-data))
;; Recompile with coverage instrumentation.
(asdf:load-system system :force (list system))
;; Remove coverage instrumentation.
(asdf:load-system system :force (list system))))
(defmacro with-coverage ((system) &body body)
`(call-with-coverage (lambda () ,@body) ,system))
Then you can do eg.
to generate the coverage report for the system.