Date: Wednesday, May 18, 2022 @ 08:13:30
  Author: grawlinson
Revision: 1207772

upgpkg: cl-ppcre; add tests

* Run tests.
* Fix dependencies.

Added:
  cl-ppcre/trunk/run-tests.lisp
Modified:
  cl-ppcre/trunk/PKGBUILD

----------------+
 PKGBUILD       |   30 ++++++++++++++++--------------
 run-tests.lisp |    7 +++++++
 2 files changed, 23 insertions(+), 14 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2022-05-18 08:05:07 UTC (rev 1207771)
+++ PKGBUILD    2022-05-18 08:13:30 UTC (rev 1207772)
@@ -8,10 +8,15 @@
 url='https://edicl.github.io/cl-ppcre/'
 license=('BSD')
 depends=('common-lisp' 'cl-asdf' 'cl-unicode')
-makedepends=('git' 'sbcl')
+makedepends=('git')
+checkdepends=('sbcl' 'cl-flexi-streams' 'perl')
 _commit='b4056c5aecd9304e80abced0ef9c89cd66ecfb5e'
-source=("$pkgname::git+https://github.com/edicl/cl-ppcre#commit=$_commit";)
-b2sums=('SKIP')
+source=(
+  "$pkgname::git+https://github.com/edicl/cl-ppcre#commit=$_commit";
+  'run-tests.lisp'
+)
+b2sums=('SKIP'
+        
'cd4fc113c2f1b1e3180010a79621d84b44d79dd47f10aaef9615b56b41f94625584a034059164546456b472adcac19ca0c2db98c889c159ac3c323fc5163d469')
 
 pkgver() {
   cd "$pkgname"
@@ -19,22 +24,19 @@
   git describe --tags | sed -e 's/^v//' -e 's/-/.r/' -e 's/-/./g'
 }
 
+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
-  cp -vr test cl-ppcre-unicode ./*.{lisp,asd} "$pkgname.asd" 
"$pkgdir/usr/share/common-lisp/source/$pkgname"
+  install -vd "$pkgdir/usr/share/common-lisp/source/$pkgname"
+  cp -vr test cl-ppcre-unicode ./*.{lisp,asd} 
"$pkgdir/usr/share/common-lisp/source/$pkgname"
 
-  pushd "$pkgdir/usr/share/common-lisp/systems"
-  ln -s "../source/$pkgname/$pkgname.asd" .
-  ln -s "../source/$pkgname/$pkgname-unicode.asd" .
-  popd
-
   # documentation
   install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md docs/index.html
 

Added: run-tests.lisp
===================================================================
--- run-tests.lisp                              (rev 0)
+++ run-tests.lisp      2022-05-18 08:13:30 UTC (rev 1207772)
@@ -0,0 +1,7 @@
+(require "asdf")
+
+(push (uiop/os:getcwd) asdf:*central-registry*)
+
+(asdf:load-system "cl-ppcre-unicode/test")
+
+(uiop:quit (if (cl-ppcre-test:run-all-tests :more-tests 
'cl-ppcre-test:unicode-test) 0 1))

Reply via email to