From e7f68af6ca7e5292ed3c01c48971dc76e2837f1e Mon Sep 17 00:00:00 2001 From: Stelian Ionescu <sionescu@cddr.org> Date: Thu, 3 Feb 2022 20:42:06 -0500 Subject: [PATCH] Use modern ASDF style and define all systems in alexandria.asd --- alexandria-1/tests.lisp | 4 ++-- alexandria-2/tests.lisp | 4 ++-- alexandria-tests.asd | 16 ---------------- alexandria.asd | 19 ++++++++++++++++++- scripts/ci-test.lisp | 2 +- 5 files changed, 23 insertions(+), 22 deletions(-) delete mode 100644 alexandria-tests.asd diff --git a/alexandria-1/tests.lisp b/alexandria-1/tests.lisp index dc3d921..6b39475 100644 --- a/alexandria-1/tests.lisp +++ b/alexandria-1/tests.lisp @@ -1,11 +1,11 @@ (in-package :cl-user) -(defpackage :alexandria-tests +(defpackage :alexandria/tests (:use :cl :alexandria #+sbcl :sb-rt #-sbcl :rtest) (:import-from #+sbcl :sb-rt #-sbcl :rtest #:*compile-tests* #:*expected-failures*)) -(in-package :alexandria-tests) +(in-package :alexandria/tests) (defun run-tests (&key ((:compiled *compile-tests*))) (do-tests)) diff --git a/alexandria-2/tests.lisp b/alexandria-2/tests.lisp index 7da93a7..531a2cd 100644 --- a/alexandria-2/tests.lisp +++ b/alexandria-2/tests.lisp @@ -1,11 +1,11 @@ (in-package :cl-user) -(defpackage :alexandria2-tests +(defpackage :alexandria-2/tests (:use :cl :alexandria-2 #+sbcl :sb-rt #-sbcl :rtest) (:import-from #+sbcl :sb-rt #-sbcl :rtest #:*compile-tests* #:*expected-failures*)) -(in-package :alexandria2-tests) +(in-package :alexandria-2/tests) ;; Arrays Tests (deftest dim-in-bounds-p.0 diff --git a/alexandria-tests.asd b/alexandria-tests.asd deleted file mode 100644 index c211424..0000000 --- a/alexandria-tests.asd +++ /dev/null @@ -1,16 +0,0 @@ -(defsystem "alexandria-tests" - :licence "Public Domain / 0-clause MIT" - :description "Tests for Alexandria, which is a collection of portable public domain utilities." - :author "Nikodemus Siivola <nikodemus@sb-studio.net>, and others." - :depends-on (:alexandria #+sbcl :sb-rt #-sbcl :rt) - :components ((:file "alexandria-1/tests") - (:file "alexandria-2/tests")) - :perform (test-op (o c) - (let ((unexpected-failure-p nil)) - (flet ((run-tests (&rest args) - (unless (apply (intern (string '#:run-tests) '#:alexandria-tests) args) - (setf unexpected-failure-p t)))) - (run-tests :compiled nil) - (run-tests :compiled t)) - (when unexpected-failure-p - (error "Unexpected test failure"))))) diff --git a/alexandria.asd b/alexandria.asd index ea543da..466d373 100644 --- a/alexandria.asd +++ b/alexandria.asd @@ -67,4 +67,21 @@ the following constraints: (:file "control-flow" :depends-on ("package")) (:file "sequences" :depends-on ("package")) (:file "lists" :depends-on ("package"))))) - :in-order-to ((test-op (test-op "alexandria-tests")))) + :in-order-to ((test-op (test-op "alexandria/tests")))) + +(defsystem "alexandria/tests" + :licence "Public Domain / 0-clause MIT" + :description "Tests for Alexandria, which is a collection of portable public domain utilities." + :author "Nikodemus Siivola <nikodemus@sb-studio.net>, and others." + :depends-on (:alexandria #+sbcl :sb-rt #-sbcl :rt) + :components ((:file "alexandria-1/tests") + (:file "alexandria-2/tests")) + :perform (test-op (o c) + (let ((unexpected-failure-p nil)) + (flet ((run-tests (&rest args) + (unless (apply (intern (string '#:run-tests) '#:alexandria/tests) args) + (setf unexpected-failure-p t)))) + (run-tests :compiled nil) + (run-tests :compiled t)) + (when unexpected-failure-p + (error "Unexpected test failure"))))) diff --git a/scripts/ci-test.lisp b/scripts/ci-test.lisp index 7dd3800..2d74959 100644 --- a/scripts/ci-test.lisp +++ b/scripts/ci-test.lisp @@ -1,5 +1,5 @@ ;; Install all the deps -(ql:quickload "alexandria-tests") +(ql:quickload "alexandria/tests") ;; Run the tests! (asdf:test-system "alexandria") -- GitLab