【发布时间】:2023-03-06 04:16:01
【问题描述】:
我正在尝试使用我在此处找到的说明构建一个 Common Lisp 项目:http://turtleware.eu/posts/Tutorial-Working-with-FiveAM.html。我克隆了 repo 并按照文档中的说明进行操作,以便我的 .asd 文件、package.lisp 文件以及我的 tests/package.lisp 和 tests/main.lisp 文件与说明匹配。我跑了(asdf:test-system 'quasirpg),一切正常。
我将此示例项目复制到我的实际工作文件夹中,并进行了搜索和替换以将 quasirpg 的所有实例更改为 foo。我跑了(asdf:test-system 'foo),REPL 给了我一个错误,找不到包“FOO-TESTS”。
现在,我重新运行 (asdf:test-system 'quasirpg),它以前有效,REPL 给了我同样的错误,找不到包“QUASIRPG-TESTS”。
谁能解释一下这里发生了什么以及我如何让我的asdf 包管理器找到测试包?
Thank you.
;;;; foo.asd
(asdf:defsystem #:foo
:description "Part of the FiveAM tutorial"
:author "Tomek 'uint' Kurcz"
:license "GPLv3"
:serial t
:components ((:file "package")
(:file "foo"))
:in-order-to ((test-op (test-op "foo/tests"))))
(asdf:defsystem #:foo/tests
:depends-on (:foo :fiveam)
:components ((:module "tests"
:serial t
:components ((:file "package")
(:file "main"))))
:perform (test-op (o s)
(uiop:symbol-call :fiveam :run! 'foo-tests:all-tests)))
;;;; tests/package.lisp
(defpackage #:foo-tests
(:use :cl :fiveam)
(:export #:run! #:all-tests))
;;;; tests/main.lisp
(in-package #:foo-tests)
(def-suite all-tests
:description "The master suite of all foo tests.")
;; tests continue below
【问题讨论】:
-
我已经在stackoverflow.com/a/59981811/31615的第二部分回答了,不是吗?
标签: common-lisp asdf