Coverage report: /home/runner/work/geb/geb/test/run-tests.lisp
Kind | Covered | All | % |
expression | 7 | 66 | 10.6 |
branch | 1 | 6 | 16.7 |
Key
Not instrumented
Conditionalized out
Executed
Not executed
Both branches taken
One branch taken
Neither branch taken
3
(defparameter *all-tests*
4
(list 'geb 'geb.lambda 'geb.lambda-experimental 'geb.lambda-conversion))
6
;; This just dumps the interactive information doesn't prompt you
7
(defclass noisy-interactive (plain interactive)
10
(defclass noisy-summary (interactive summary)
13
(defun run-tests-error ()
14
(let ((tests (parachute:status (geb-test:run-tests))))
15
(if (eq :failed tests)
16
(error "tests failed")
20
(defun run-tests (&key
24
(designators '(geb-test-suite)))
25
"Here we run all the tests. We have many flags to determine how the
29
(run-tests :plain? nil :interactive? t) ==> 'interactive
30
(run-tests :summary? t :interactive? t) ==> 'noisy-summary
31
(run-tests :interactive? t) ==> 'noisy-interactive
32
(run-tests :summary? t) ==> 'summary
33
(run-tests) ==> 'plain
35
(run-tests :designators '(geb geb.lambda)) ==> run only those packages
39
:report (cond ((and summary? interactive?) 'noisy-summary)
41
((and plain? interactive?) 'noisy-interactive)
42
(interactive? 'interactive)
50
(remove-if-not (lambda (p)
51
(let ((search (search "GEB" (package-name p))))
52
(and search (= 0 search))))
55
(remove-if (lambda (p)
56
(member (package-name p) '("geb-test")
60
(slynk-backend:profile-package alu t t))
64
(defun unprofile-all ()
65
(slynk-backend:unprofile-all))
68
(defun profiler-report ()
69
(slynk-backend:profile-report))
72
(defun profiler-reset ()
73
(slynk-backend:profile-reset))
76
(defun code-coverage (&optional path)
77
"generates code coverage, for CCL the coverage can be found at
79
[CCL test coverage](../docs/tests/report.html)
81
[SBCL test coverage](../docs/tests/cover-index.html)
83
simply run this function to generate a fresh one
85
(ccl:reset-incremental-coverage)
88
(setq ccl:*compile-code-coverage* t)
89
(asdf:compile-system :geb :force t)
90
(asdf:compile-system :geb/test :force t)
92
(let ((coverage (make-hash-table)))
93
;; we want to note that some code loads before we can even test
94
;; it, so mark these under their own section
95
(setf (gethash 'alucard.startup coverage)
96
(ccl:get-incremental-coverage))
98
(run-tests :summary? t :designators test)
100
(setf (gethash test coverage)
101
(ccl:get-incremental-coverage))))
102
(parachute:children (find-test 'geb-test-suite)))
103
(ccl:report-coverage (if path
104
;; this is bad by god fix
105
(format nil "~Areport.html" path)
106
#p"../docs/tests/report.html")
109
(setq ccl:*compile-code-coverage* nil)
110
(asdf:compile-system :geb :force t)
111
(asdf:compile-system :geb/test :force t))
114
(eval-when (:compile-toplevel :load-toplevel :execute)
118
(defun code-coverage (&optional (path nil))
119
"generates code coverage, for CCL the coverage can be found at
121
[CCL test coverage](../docs/tests/report.html)
123
[SBCL test coverage](../docs/tests/cover-index.html)
125
simply run this function to generate a fresh one
128
(declaim (optimize (sb-cover:store-coverage-data 3)))
129
(asdf:oos 'asdf:load-op :geb :force t)
130
(asdf:oos 'asdf:load-op :geb/test :force t)
131
(run-tests :summary? t)
132
(sb-cover:report (if path path "../docs/tests/"))
134
(declaim (optimize (sb-cover:store-coverage-data 3)))
135
(asdf:oos 'asdf:load-op :geb :force t)
136
(asdf:oos 'asdf:load-op :geb/test :force t))
139
(defun code-coverage (&optional path)
140
"generates code coverage, for CCL the coverage can be found at
142
[CCL test coverage](../docs/tests/report.html)
144
[SBCL test coverage](../docs/tests/cover-index.html)
146
simply run this function to generate a fresh one