unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Code coverage
@ 2019-04-12 10:35 jeremy
  2019-04-13 14:52 ` Jeremy Korwin-Zmijowski
  0 siblings, 1 reply; 4+ messages in thread
From: jeremy @ 2019-04-12 10:35 UTC (permalink / raw)
  To: guile-user

Hello dear guilers !

I have implemented a code coverage test with a piece of code I modified 
for my usage, here it is (filename : cybo-cov.scm):

(use-modules (system vm coverage)
	     (system vm vm)
	     (srfi srfi-11))

(let ((output-directory
        (string-append
	(getenv "HOME") "/Workspace/guile-cybo/coverage")))
   (let-values (((data . values)
		(with-code-coverage (the-vm)
				    (lambda ()
				      (load "cybo-test.scm")))))
     (let* ((port (mkstemp! (string-copy "/tmp/cybo-coverage-XXXXXX")))
	   (file (port-filename port)))
       (coverage-data->lcov data port)
       (close port)
       (when (not (zero? (system* "genhtml" file "-o" output-directory)))
	    (error "genhtml failed"))
       (delete-file file))))

When I execute

$ guile -L .

then

scheme@(guile-user)> (load "cybo-cov.scm")

The report seems to cover my project and all Guile 2.0 code. I would 
like the test to focus on my project only.
Does someone know how I can configure the test ?

Thank you in advance for your help.

Jeko



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-04-16 21:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-12 10:35 Code coverage jeremy
2019-04-13 14:52 ` Jeremy Korwin-Zmijowski
2019-04-13 15:59   ` Amirouche Boubekki
2019-04-16 21:56     ` Jeremy Korwin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).