Skip to content

Commit 7bcd7fb

Browse files
committed
feat: Better handle test
1 parent 5d27cd6 commit 7bcd7fb

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

lisp/core/test.lisp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,23 @@
99

1010
;;; Code
1111

12+
(defun qob-test--by-name (name)
13+
"Test the system's NAME."
14+
(let ((system (ignore-errors (asdf:find-system name))))
15+
(if system
16+
(asdf:test-system name)
17+
(qob-println "✗ The test system ~A not found, skipped" (qob-ansi-green name)))))
18+
1219
(qob-start
1320
(let ((names (qob-args))
1421
(primary-test-system (qob-primary-test-system-entry)))
1522
(cond
1623
;; If specified system(s).
1724
(names
18-
(dolist (name names)
19-
(asdf:test-system name)))
25+
(mapc #'qob-test--by-name names))
2026
;; Print primary system.
2127
(primary-test-system
22-
(asdf:test-system (car primary-test-system)))
28+
(qob-test--by-name (car primary-test-system)))
2329
;; Print help.
2430
(t
2531
(qob-help "core/test")))))

test/commands/local/run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,4 @@ qob eval "(progn )"
4949

5050
# Testing
5151
qob test
52+
qob test mini.system.1/tests

0 commit comments

Comments
 (0)