When you compile-file
this:
(defmethod asdf:perform ((op test-op) (system (eql (find-system :foo))))
(asdf:load-system 'foo-tests)
(foo-tests:run-tests))
the first step is to read
the entire form. Read
ing includes interning of all symbols found. However, at read time, the form has not executed, so the system foo-tests
is not yet loaded. Since that system includes the package foo-tests
, and that is not loaded yet either, you cannot intern any symbols into that package at read time of this form.
That's why compile-file
gives the error shown when trying to read
the form.
It seems to me that you would need to (funcall (find-symbol "RUN-TESTS" #:foo-tests))
.