Improve Makefile “test”, add general TEST package
This commit is contained in:
parent
bf404c7605
commit
373f8a1194
|
@ -8,6 +8,7 @@
|
||||||
:author "Jaidyn Ann <jadedctrl@posteo.at>"
|
:author "Jaidyn Ann <jadedctrl@posteo.at>"
|
||||||
:homepage "https://hak.xwx.moe/jadedctrl/activitypub-servist"
|
:homepage "https://hak.xwx.moe/jadedctrl/activitypub-servist"
|
||||||
|
|
||||||
|
:in-order-to ((test-op (test-op "activitypub/tests")))
|
||||||
:depends-on ("activitypub-servist/signatures"
|
:depends-on ("activitypub-servist/signatures"
|
||||||
"alexandria" "clack" "dexador"
|
"alexandria" "clack" "dexador"
|
||||||
"local-time" "purl" "str" "webtentacle" "yason")
|
"local-time" "purl" "str" "webtentacle" "yason")
|
||||||
|
@ -21,6 +22,7 @@
|
||||||
:author "Jaidyn Ann <jadedctrl@posteo.at>"
|
:author "Jaidyn Ann <jadedctrl@posteo.at>"
|
||||||
:homepage "https://hak.xwx.moe/jadedctrl/activitypub-servist"
|
:homepage "https://hak.xwx.moe/jadedctrl/activitypub-servist"
|
||||||
|
|
||||||
|
:in-order-to ((test-op (test-op "activitypub/tests/activity-vocabulary")))
|
||||||
:depends-on ("alexandria" "closer-mop" "str" "yason")
|
:depends-on ("alexandria" "closer-mop" "str" "yason")
|
||||||
:components ((:file "src/activity-vocabulary")))
|
:components ((:file "src/activity-vocabulary")))
|
||||||
|
|
||||||
|
@ -32,6 +34,7 @@
|
||||||
:author "Jaidyn Ann <jadedctrl@posteo.at>"
|
:author "Jaidyn Ann <jadedctrl@posteo.at>"
|
||||||
:homepage "https://hak.xwx.moe/jadedctrl/activitypub-servist"
|
:homepage "https://hak.xwx.moe/jadedctrl/activitypub-servist"
|
||||||
|
|
||||||
|
:in-order-to ((test-op (test-op "activitypub/tests/signatures")))
|
||||||
:depends-on ("cl-base64" "flexi-streams" "inferior-shell" "ironclad" "str")
|
:depends-on ("cl-base64" "flexi-streams" "inferior-shell" "ironclad" "str")
|
||||||
:components ((:file "src/signatures")))
|
:components ((:file "src/signatures")))
|
||||||
|
|
||||||
|
@ -59,10 +62,23 @@
|
||||||
:components ((:file "t/signatures")))
|
:components ((:file "t/signatures")))
|
||||||
|
|
||||||
|
|
||||||
|
(asdf:defsystem "activitypub-servist/tests"
|
||||||
|
:version "0.0"
|
||||||
|
:license "AGPLv3"
|
||||||
|
:author "Jaidyn Ann <jadedctrl@posteo.at>"
|
||||||
|
:description "Tests for all activitypub-servist subpacakges."
|
||||||
|
|
||||||
|
:depends-on (:activitypub-servist/tests/activity-vocabulary
|
||||||
|
:activitypub-servist/tests/signatures
|
||||||
|
:alexandria :lisp-unit2)
|
||||||
|
:components ((:file "t/t")))
|
||||||
|
|
||||||
;; Following method tweaked from lisp-unit2’s documentation:
|
;; Following method tweaked from lisp-unit2’s documentation:
|
||||||
;; https://github.com/AccelerationNet/lisp-unit2/blob/master/README.md#asdf
|
;; https://github.com/AccelerationNet/lisp-unit2/blob/master/README.md#asdf
|
||||||
(defmethod asdf:perform ((o asdf:test-op) (c (eql (asdf:find-system :activitypub-servist/tests/activity-vocabulary))))
|
(defmacro define-asdf-testing (package)
|
||||||
(eval (read-from-string "(activtiypub-servist/tests/activity-vocabulary:run)")))
|
`(defmethod asdf:perform ((o asdf:test-op) (c (eql (asdf:find-system ',package))))
|
||||||
|
(eval (read-from-string (format nil "(~A:run-with-summary)" ',package)))))
|
||||||
|
|
||||||
(defmethod asdf:perform ((o asdf:test-op) (c (eql (asdf:find-system :activitypub-servist/tests/signatures))))
|
(define-asdf-testing activitypub-servist/tests/activity-vocabulary)
|
||||||
(eval (read-from-string "(activtiypub-servist/tests/signatures:run)")))
|
(define-asdf-testing activitypub-servist/tests/signatures)
|
||||||
|
(define-asdf-testing activitypub-servist/tests)
|
||||||
|
|
|
@ -18,14 +18,18 @@
|
||||||
(defpackage :activitypub-servist/tests/activity-vocabulary
|
(defpackage :activitypub-servist/tests/activity-vocabulary
|
||||||
(:use :cl :lisp-unit2)
|
(:use :cl :lisp-unit2)
|
||||||
(:nicknames "AP-S/T/AV")
|
(:nicknames "AP-S/T/AV")
|
||||||
(:export :run))
|
(:export :run :run-with-summary))
|
||||||
|
|
||||||
(in-package :activitypub-servist/tests/activity-vocabulary)
|
(in-package :activitypub-servist/tests/activity-vocabulary)
|
||||||
|
|
||||||
(defun run ()
|
(defun run ()
|
||||||
"Run all ACTIVITY-VOCABULARY tests."
|
"Run all ACTIVITY-VOCABULARY tests."
|
||||||
|
(lisp-unit2:run-tests :package :activitypub-servist/tests/activity-vocabulary))
|
||||||
|
|
||||||
|
(defun run-with-summary ()
|
||||||
|
"Run tests with summary for ACTIVITY-VOCABULARY."
|
||||||
(lisp-unit2:with-summary()
|
(lisp-unit2:with-summary()
|
||||||
(lisp-unit2:run-tests :package :activitypub-servist/tests/activity-vocabulary)))
|
(run)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,14 +18,18 @@
|
||||||
(defpackage :activitypub-servist/tests/signatures
|
(defpackage :activitypub-servist/tests/signatures
|
||||||
(:use :cl :lisp-unit2)
|
(:use :cl :lisp-unit2)
|
||||||
(:nicknames "AP-S/T/S")
|
(:nicknames "AP-S/T/S")
|
||||||
(:export :run))
|
(:export :run :run-with-summary))
|
||||||
|
|
||||||
(in-package :activitypub-servist/tests/signatures)
|
(in-package :activitypub-servist/tests/signatures)
|
||||||
|
|
||||||
(defun run ()
|
(defun run ()
|
||||||
"Run all SIGNATURES tests."
|
"Run all SIGNATURES tests."
|
||||||
|
(lisp-unit2:run-tests :package :activitypub-servist/tests/signatures))
|
||||||
|
|
||||||
|
(defun run-with-summary ()
|
||||||
|
"Run tests with summary for SIGNATURES."
|
||||||
(lisp-unit2:with-summary()
|
(lisp-unit2:with-summary()
|
||||||
(lisp-unit2:run-tests :package :activitypub-servist/tests/signatures)))
|
(run)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Ŝarĝante…
Reference in New Issue