3 Running Tests
dxtr edited this page 2026-10-16 14:31:15 +02:00

Running Tests

stift test                          # the project's systems, on SBCL
stift test --lisp sbcl --lisp ccl   # on both
stift test hello/extra              # one system

stift runs each system's test suite with asdf:test-system, in a new Lisp for each implementation given with --lisp, so that no suite's state reaches another. With no system named, it tests the project's primary systems, those its .asd files are named after; at a workspace's root, every member's (see Workspaces). The suites run with the build list, test requirements included.

--lisp names the program that starts the Lisp: sbcl, ccl, or a path to one. On Windows, CCL's program is wx86cl64.

When a suite fails

ASDF defines no result for test-op. As its manual suggests, a suite fails when an error escapes asdf:test-system, so stift needs to know no test framework. A test system's test-op must signal when its tests fail, as this one does with Parachute:

(defsystem "hello/test"
  :depends-on ("hello" "parachute")
  :components ((:file "test"))
  :perform (test-op (op c)
             (let ((report (symbol-call :parachute :test :hello/test
                                        :report (find-symbol "SUMMARY" :parachute))))
               (unless (eq :passed (symbol-call :parachute :status report))
                 (error "hello's tests failed.")))))

A system that does not load fails too, with ASDF's message.

What stift prints

Each suite's own output goes to the terminal as it comes. At the end stift prints a line for each suite, and exits with 0 when every suite passed and 1 otherwise:

ok    hello        sbcl  0.4s
FAIL  hello/extra  ccl   1.3s  hello's tests failed.

Ctrl-C stops the suite that runs, and the rest do not run.