-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcoverage.lisp
More file actions
33 lines (27 loc) · 902 Bytes
/
coverage.lisp
File metadata and controls
33 lines (27 loc) · 902 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#|
Run tests + generate coverage report, use sbcl --script coverage.lisp
|#
(in-package #:cl-user)
(defvar *system* "lgame")
(defvar *test-system* (uiop:strcat *system* "/test"))
#-quicklisp
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
(user-homedir-pathname))))
(when (probe-file quicklisp-init)
(load quicklisp-init)))
(ql:quickload *system* :silent t)
(ql:quickload *test-system* :silent t)
#+sbcl
(require :sb-cover)
#+sbcl
(declaim (optimize sb-cover:store-coverage-data))
(let ((*compile-verbose* nil)
(*load-verbose* nil))
(asdf:load-system *system* :force t)
;; Note: could just call on *test-system* directly,
;; but this ensures that *system* is setup to
;; point to the test system for testing.
(asdf:test-system *system*))
#+sbcl
(handler-bind ((warning #'muffle-warning))
(sb-cover:report "coverage/"))