Commit 29806375 authored by Eric Timmons's avatar Eric Timmons
Browse files

Add the beginnings of a test suite

It's not much yet, but it's something
parent 9a08a42f
(:source-registry-cache
"clpm-asdf.asd"
"clpm-cli.asd"
"clpm-test.asd"
"clpm.asd"
"clpm-client/clpm-client.asd"
"ext/3bz/3bz.asd"
......@@ -76,8 +77,10 @@
"ext/fast-io/fast-io-test.asd"
"ext/fast-io/fast-io.asd"
"ext/file-attributes/file-attributes.asd"
"ext/fiveam/fiveam.asd"
"ext/flexi-streams/flexi-streams.asd"
"ext/global-vars/global-vars.asd"
"ext/hunchentoot/hunchentoot.asd"
"ext/ieee-floats/ieee-floats.asd"
"ext/ironclad/ironclad-text.asd"
"ext/ironclad/ironclad.asd"
......
......@@ -229,3 +229,9 @@
[submodule "ext/asdf-release-ops"]
path = ext/asdf-release-ops
url = https://github.com/daewok/asdf-release-ops.git
[submodule "ext/hunchentoot"]
path = ext/hunchentoot
url = https://github.com/edicl/hunchentoot.git
[submodule "ext/fiveam"]
path = ext/fiveam
url = https://github.com/lispci/fiveam.git
;;;; CLPM Test System Definition
;;;;
;;;; This software is part of CLPM. See README.org for more information. See
;;;; LICENSE for license information.
#-:asdf3.2
(error "Requires ASDF >=3.2")
(defsystem #:clpm-test
:version (:read-file-form "version.lisp-expr")
:description "Tests for CLPM"
:license "BSD-2-Clause"
:pathname "test/"
:depends-on (#:fiveam #:hunchentoot)
:serial t
:components
((:file "package")
(:file "suite")
(:file "quicklisp-bundle")
(:file "tests")))
......@@ -51,7 +51,13 @@
(:readme-file "README")
(:dependencies-license-file "BUNDLED-LICENSES"))))))))
:in-order-to ((program-op (load-op :clpm-cli))
(asdf-release-ops:perform-program-image-op (load-op :clpm-cli))))
(asdf-release-ops:perform-program-image-op (load-op :clpm-cli))
(test-op (asdf-release-ops:dynamic-program-op :clpm)
(load-op :clpm-test)))
:perform (test-op (o c)
(funcall (uiop:find-symbol* :run-tests-with-server :clpm-test)
:clpm (output-file 'asdf-release-ops:dynamic-program-op c))))
(defsystem #:clpm/client-helper
:description "Helper to make sure clpm-client is built before clpm/client is
......
Subproject commit 0c73f12e1912e847fbb2c70cd482abf5f2b97be1
Subproject commit fa36e202de7a87490ef4e687a4c9c34547a7a596
(uiop:define-package #:clpm-test
(:use #:cl
#:fiveam))
(in-package #:clpm-test)
(in-package #:clpm-test)
(test (quicklisp-bundle :suite :clpm)
(uiop:with-current-directory ((asdf:system-relative-pathname :clpm "test/quicklisp-bundle/"))
(finishes
(uiop:run-program `(,*clpm* "bundle" "install" "-y" "--no-resolve")
:output :interactive
:error-output :interactive)
(uiop:run-program `(,*clpm* "bundle" "exec" "--" "sbcl" "--non-interactive" "--eval" "(asdf:load-system :quicklisp-bundle)" "--quit")
:output :interactive
:error-output :interactive))))
;;; -*- mode: common-lisp -*-
(:api-version "0.3")
(:source "quicklisp"
:type :quicklisp
:url "http://localhost:8091/dist/quicklisp-test.txt")
(:asd "quicklisp-bundle.asd")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; This is autogenerated by CLPM. Do not edit by hand.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(:api-version "0.3")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; BEGIN SOURCES
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
:sources
(:implicit-file :type :file-system :system-files ("quicklisp-bundle.asd"))
(:implicit-vcs :type :vcs :projects nil)
("quicklisp" :url "http://localhost:8091/dist/quicklisp-test.txt" :type
:quicklisp)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; BEGIN REQUIREMENTS
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
:requirements
(:asd-file :name "quicklisp-bundle.asd")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; BEGIN RELEASES
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
:releases
("alexandria" :version "2021-02-21" :source "quicklisp" :systems ("alexandria"))
("quicklisp-bundle.asd" :version :newest :source :implicit-file :systems
("quicklisp-bundle"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; BEGIN REVERSE-DEPENDENCIES
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
:reverse-dependencies
("alexandria" ((:system :name "quicklisp-bundle") (:system :name "alexandria")))
("quicklisp-bundle.asd" (t (:asd-file :name "quicklisp-bundle.asd")))
(uiop:define-package #:quicklisp-bundle
(:use #:cl
#:alexandria))
(in-package #:quicklisp-bundle)
(assert (equal (iota 3) '(0 1 2)))
(asdf:defsystem "quicklisp-bundle"
:depends-on (#:alexandria)
:components ((:file "file-1")))
(in-package #:clpm-test)
(def-suite :clpm)
(defvar *clpm* "clpm"
"How to run clpm")
(in-package #:clpm-test)
(defun start-server ()
(hunchentoot:start (make-instance 'hunchentoot:easy-acceptor
:port 8091
:document-root (asdf:system-relative-pathname :clpm "test/web-server/static/"))))
(defun stop-server (server)
(hunchentoot:stop server))
(defun call-with-server-running (thunk)
(let ((server (start-server)))
(unwind-protect
(funcall thunk)
(stop-server server))))
(defmacro with-server (() &body body)
`(call-with-server-running (lambda () ,@body)))
(defun run-tests-with-server (&key (clpm "clpm"))
(let ((*clpm* (namestring clpm)))
(with-server ()
(fiveam:run! :clpm))))
2021-02-21 http://localhost:8091/dist/quicklisp-test/2021-02-01/distinfo.txt
name: quicklisp-test
version: 2021-02-21
system-index-url: http://localhost:8091/dist/quicklisp-test/2021-02-01/systems.txt
release-index-url: http://localhost:8091/dist/quicklisp-test/2021-02-01/releases.txt
archive-base-url: http://localhost:8091/
canonical-distinfo-url: http://localhost:8091/dist/quicklisp-test/2021-02-01/distinfo.txt
distinfo-subscription-url: http://localhost:8091/dist/quicklisp-test.txt
name: quicklisp-test
version: 2021-02-21
system-index-url: http://localhost:8091/dist/quicklisp-test/2021-02-01/systems.txt
release-index-url: http://localhost:8091/dist/quicklisp-test/2021-02-01/releases.txt
archive-base-url: http://localhost:8091/
canonical-distinfo-url: http://localhost:8091/dist/quicklisp-test/2021-02-01/distinfo.txt
distinfo-subscription-url: http://localhost:8091/dist/quicklisp-test.txt
# project url size file-md5 content-sha1 prefix [system-file1..system-fileN]
alexandria http://localhost:8091/archive/alexandria/2020-09-25/alexandria-20200925-git.tgz 54730 59c8237a854de6f4f93328cd5747cd14 c531b4f1469d257643362b700745b3a54c132bef alexandria-20200925-git alexandria-tests.asd alexandria.asd
# project system-file system-name [dependency1..dependencyN]
alexandria alexandria alexandria asdf
alexandria alexandria-tests alexandria-tests alexandria asdf
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment