mirror of
https://github.com/vale981/lack
synced 2025-03-05 09:21:39 -05:00
Support coverage report in ./run-test.ros.
This commit is contained in:
parent
5fceea7d90
commit
89d85aad36
2 changed files with 20 additions and 21 deletions
11
.travis.yml
11
.travis.yml
|
@ -15,13 +15,4 @@ before_script:
|
|||
- git clone https://github.com/fukamachi/cl-coveralls $TRAVIS_BUILD_DIR/quicklisp/local-projects/cl-coveralls
|
||||
|
||||
script:
|
||||
- ros -s prove -s cl-coveralls
|
||||
-e '(or (coveralls:with-coveralls (:exclude (list "t" "quicklisp"))
|
||||
(loop for file in (uiop:directory-files (uiop:ensure-directory-pathname (uiop:getenv "TRAVIS_BUILD_DIR")))
|
||||
when (and (string= (pathname-type file) "asd")
|
||||
(< 2 (length (pathname-name file)))
|
||||
(string= (pathname-name file) "t-" :end1 2))
|
||||
collect (pathname-name file) into test-files
|
||||
finally
|
||||
(return (not (some (function null) (mapcar (function prove:run) test-files))))))
|
||||
(uiop:quit -1))'
|
||||
- COVERAGE_EXCLUDE=t/ ./run-test.ros t-*.asd
|
||||
|
|
30
run-test.ros
30
run-test.ros
|
@ -7,16 +7,24 @@ exec ros -Q -- $0 "$@"
|
|||
(unless (find-package :uiop)
|
||||
(ql:quickload :uiop :silent t))
|
||||
|
||||
(ql:quickload :prove :silent t)
|
||||
(ql:quickload '(:prove :cl-coveralls :split-sequence) :silent t)
|
||||
|
||||
(defun main (&rest test-files)
|
||||
(when (some #'null
|
||||
(mapcar (lambda (test-file)
|
||||
(let ((test-file (pathname test-file)))
|
||||
(unless (or (probe-file test-file)
|
||||
(string= (pathname-type test-file) "asd"))
|
||||
(error "~S is not an asd file." test-file))
|
||||
(load test-file)
|
||||
(prove:run-test-system (asdf:find-system (pathname-name test-file)))))
|
||||
test-files))
|
||||
(uiop:quit -1)))
|
||||
(labels ((run-tests ()
|
||||
(not
|
||||
(some #'null
|
||||
(mapcar (lambda (test-file)
|
||||
(let ((test-file (pathname test-file)))
|
||||
(unless (or (probe-file test-file)
|
||||
(string= (pathname-type test-file) "asd"))
|
||||
(error "~S is not an asd file." test-file))
|
||||
(load test-file)
|
||||
(prove:run-test-system (asdf:find-system (pathname-name test-file)))))
|
||||
test-files)))))
|
||||
(or (if (uiop:getenv "COVERALLS")
|
||||
(coveralls:with-coveralls (:exclude
|
||||
(split-sequence:split-sequence #\: (or (uiop:getenv "COVERAGE_EXCLUDE") "")
|
||||
:remove-empty-subseqs t))
|
||||
(run-tests))
|
||||
(run-tests))
|
||||
(uiop:quit -1))))
|
||||
|
|
Loading…
Add table
Reference in a new issue