Previous: ASDF development FAQs, Up: ASDF development FAQs


13.7.1 How do I run the tests interactively in a REPL?

This not-so-frequently asked question is primarily for ASDF developers, but those who encounter an unexpected error in some test may be interested, too.

Here's the procedure for experimenting with tests in a REPL:

     ;; BEWARE! Some tests expect you to be in the .../asdf/test directory
     ;; If your REPL is not there yet, change your current directory:
     ;; under SLIME, you may: ,change-directory ~/common-lisp/asdf/test/
     ;; otherwise you may evaluate something like:
     (require "asdf") (asdf:upgrade-asdf) ;load UIOP & update asdf.lisp
     (uiop:chdir (asdf:system-relative-pathname :asdf "test/"))
     (setf *default-pathname-defaults* (uiop:getcwd))
     
     ;; Load the test script support.
     (load "script-support.lisp")
     
     ;; Initialize the script support.
     ;; This will also change your *package* to asdf-test.
     ;; NB: this function is also available from package cl-user,
     ;; and also available with the shorter name da in both packages.
     (asdf-test::debug-asdf)
     
     ;; In case you modified ASDF since you last tested it,
     ;; you need to update asdf.lisp itself by evaluating 'make' in a shell,
     ;; or (require "asdf") (asdf:load-system :asdf) in another CL REPL,
     ;; if not done in this REPL above.
     ;; *Then*, in this REPL, you need to evaluate:
     ;(asdf-test::compile-load-asdf)
     
     ;; Now, you may experiment with test code from a .script file.
     ;; See the instructions given at the end of your failing test
     ;; to identify which form is needed, e.g.
     (frob-packages)
     (asdf::with-asdf-cache () (load "test-utilities.script"))