Skip to content

Commit

Permalink
feat: Better handle test
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Nov 23, 2024
1 parent 5d27cd6 commit 7bcd7fb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lisp/core/test.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,23 @@

;;; Code

(defun qob-test--by-name (name)
"Test the system's NAME."
(let ((system (ignore-errors (asdf:find-system name))))
(if system
(asdf:test-system name)
(qob-println "✗ The test system ~A not found, skipped" (qob-ansi-green name)))))

(qob-start
(let ((names (qob-args))
(primary-test-system (qob-primary-test-system-entry)))
(cond
;; If specified system(s).
(names
(dolist (name names)
(asdf:test-system name)))
(mapc #'qob-test--by-name names))
;; Print primary system.
(primary-test-system
(asdf:test-system (car primary-test-system)))
(qob-test--by-name (car primary-test-system)))
;; Print help.
(t
(qob-help "core/test")))))
Expand Down
1 change: 1 addition & 0 deletions test/commands/local/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,4 @@ qob eval "(progn )"

# Testing
qob test
qob test mini.system.1/tests

0 comments on commit 7bcd7fb

Please sign in to comment.