summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Rawlinson2022-05-15 08:17:08 +0000
committerGeorge Rawlinson2022-05-15 08:17:08 +0000
commitecb21f244b1a1434a1f797397b1eda5f4b444aae (patch)
tree8c1ecd1fc0941d4656103a111f9990e413a75b53
downloadaur-ecb21f244b1a1434a1f797397b1eda5f4b444aae.tar.gz
addpkg: cl-unit-test r1-1
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD57
-rw-r--r--run-tests.lisp7
3 files changed, 81 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..213e0df02848
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = cl-unit-test
+ pkgdesc = Unit testing framework for Common Lisp
+ pkgver = r1.g266afaf
+ pkgrel = 1
+ url = https://github.com/hanshuebner/unit-test
+ arch = any
+ license = custom
+ checkdepends = sbcl
+ makedepends = git
+ depends = common-lisp
+ depends = cl-asdf
+ source = cl-unit-test::git+https://github.com/hanshuebner/unit-test#commit=266afaf4ac091fe0e8803bac2ae72d238144e735
+ source = run-tests.lisp
+ b2sums = SKIP
+ b2sums = 54e93e82e4ac6c3a2bc62132c22f4eef4a28f8625e3f571e2170d3dd80a21c5e196a146283d42c2204035bedec5c6cd8cb360e12fe22aea09d6ae06a10bab934
+
+pkgname = cl-unit-test
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..b62e0cb63f12
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,57 @@
+# Maintainer: George Rawlinson <grawlinson@archlinux.org>
+
+pkgname=cl-unit-test
+_pkgname="${pkgname#cl-}"
+pkgver=r1.g266afaf
+pkgrel=1
+pkgdesc='Unit testing framework for Common Lisp'
+arch=('any')
+url='https://github.com/hanshuebner/unit-test'
+license=('custom')
+depends=('common-lisp' 'cl-asdf')
+makedepends=('git')
+checkdepends=('sbcl')
+_commit='266afaf4ac091fe0e8803bac2ae72d238144e735'
+source=(
+ "$pkgname::git+$url#commit=$_commit"
+ 'run-tests.lisp'
+)
+b2sums=('SKIP'
+ '54e93e82e4ac6c3a2bc62132c22f4eef4a28f8625e3f571e2170d3dd80a21c5e196a146283d42c2204035bedec5c6cd8cb360e12fe22aea09d6ae06a10bab934')
+
+pkgver() {
+ cd "$pkgname"
+
+ printf 'r%s.g%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "$pkgname"
+
+ sed -n '/;; Copyright/,/;; of any kind/p' "$_pkgname.lisp" > LICENSE
+}
+
+check() {
+ cd "$pkgname"
+
+ sbcl --script ../run-tests.lisp
+}
+
+package() {
+ cd "$pkgname"
+
+ # create directories
+ install -vd \
+ "$pkgdir/usr/share/common-lisp/source/$_pkgname" \
+ "$pkgdir/usr/share/common-lisp/systems"
+
+ # library
+ install -vDm644 -t "$pkgdir/usr/share/common-lisp/source/$_pkgname" ./*.{lisp,asd}
+
+ pushd "$pkgdir/usr/share/common-lisp/systems"
+ ln -s "../source/$_pkgname/$_pkgname.asd" .
+ popd
+
+ # license
+ install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
+}
diff --git a/run-tests.lisp b/run-tests.lisp
new file mode 100644
index 000000000000..994bb669ec48
--- /dev/null
+++ b/run-tests.lisp
@@ -0,0 +1,7 @@
+(require "asdf")
+
+(push (uiop/os:getcwd) asdf:*central-registry*)
+
+(asdf:load-system "unit-test")
+
+(uiop:quit (if (load "testing-tests.lisp") 0 1))