r4699: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Tue, 29 Apr 2003 12:09:36 +0000 (12:09 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Tue, 29 Apr 2003 12:09:36 +0000 (12:09 +0000)
debian/control
debian/rules
uffi-tests.asd [new file with mode: 0644]
uffi.asd

index 52b040e5cd1d51f453b4a74b8c6ee2a968a76068..7730ed7760c2e0ec65c09df64a58d35a43e4d1a9 100644 (file)
@@ -3,11 +3,22 @@ Section: devel
 Priority: optional
 Maintainer: Kevin M. Rosenberg <kmr@debian.org>
 Build-Depends-Indep: debhelper (>= 4.0.0)
+Build-Depends: zlib1g-dev
 Standards-Version: 3.5.9.0
 
 Package: cl-uffi
 Architecture: all
 Depends: common-lisp-controller (>= 3.37)
+Recommends: cl-uffi-tests
 Description: Universal Foreign Function Library for Common Lisp
- UFFI provides a universal foreign function interface (FFI) for Common Lisp.
- UFFI supports CMUCL, Lispworks, and AllegroCL.
+ UFFI provides a universal foreign function interface (FFI) for 
+ Common Lisp.
+ UFFI supports AllegroCL, CMUCL, Lispworks, MCL, OpenMCL,
+ SBCL, and SCL.
+
+Package: cl-uffi-tests
+Architecture: any
+Depends: common-lisp-controller (>= 3.37), cl-uffi, zlib1g
+Description: Regression tests for UFFI Common Lisp Library
+ This is a test of regression tests for UFFI. Besides providing
+ testing for UFI, they serve as an example of UFFI usage.
index f561721db3bb06d31caa9f89dcb9d43807fb5320..36ea0d7c76a0d893e3fa4bd926dd39dfdfb6f409 100755 (executable)
@@ -1,23 +1,22 @@
 #!/usr/bin/make -f
 
-export DH_COMPAT=4
-
-pkg    := uffi
-debpkg  := cl-uffi
+pkg            := uffi
+pkg-tests      := $(pkg)-tests 
+debpkg         := cl-$(pkg)
+debpkg-tests   := $(debpkg)-tests
 
 
 clc-source     := usr/share/common-lisp/source
 clc-systems    := usr/share/common-lisp/systems
-clc-uffi       := $(clc-source)/$(pkg)
-
+clc-files      := $(clc-source)/$(pkg)
+clc-tests      := $(clc-source)/$(pkg-tests)
 doc-dir                := usr/share/doc/$(debpkg)
-
+lib-dir                := usr/lib
 
 configure: configure-stamp
 configure-stamp:
        dh_testdir
        # Add here commands to configure the package.
-
        touch configure-stamp
 
 
@@ -25,20 +24,19 @@ build: build-stamp
 
 build-stamp: configure-stamp 
        dh_testdir
-
        # Add here commands to compile the package.
-
+       (cd examples; make linux)
        touch build-stamp
 
 clean:
        dh_testdir
        dh_testroot
        rm -f build-stamp configure-stamp
-
        # Add here commands to clean up after the build process.
        -$(MAKE) clean
-       rm -f debian/cl-uffi.postinst.* debian/cl-uffi.prerm.*
-
+       cd examples
+       make clean
+       rm -f debian/$(debpkg).postinst.* debian/$(debpkg).prerm.*
        dh_clean
 
 install: build
@@ -46,12 +44,18 @@ install: build
        dh_testroot
        dh_clean -k
        dh_installdirs --all $(clc-systems) $(clc-source) 
-       dh_installdirs -p $(debpkg) $(doc-dir) $(clc-uffi)/src
+       dh_installdirs -p $(debpkg) $(doc-dir) $(clc-files)/src
 
        # Add here commands to install the package into debian/uffi.
-       dh_install uffi.asd $(clc-uffi)
-       dh_install "src/*.lisp" $(clc-uffi)/src
-       dh_link $(clc-uffi)/uffi.asd $(clc-systems)/uffi.asd
+       dh_install $(pkg).asd $(clc-files)
+       dh_install "src/*.lisp" $(clc-files)/src
+       dh_link $(clc-files)/$(pkg).asd $(clc-systems)/$(pkg).asd
+
+       dh_installdirs -p $(debpkg-tests) $(clc-tests)/tests $(lib-dir)
+       dh_install $(debpkg-tests) $(pkg-tests).asd $(clc-tests)
+       dh_install $(debpkg-tests) "examples/*.lisp" $(clc-tests)/tests
+       dh_install $(debpkg-tests) "examples/c-test-fns.so" $(lib-dir)
+       dh_link $(debpkg-tests) $(clc-tests)/$(pkg-tests).asd $(clc-systems)/$(clc-tests).$(pkg-tests)asd
 
        rm -rf doc/html
        (cd doc; tar xzf html.tar.gz; cd ..)
diff --git a/uffi-tests.asd b/uffi-tests.asd
new file mode 100644 (file)
index 0000000..37a3e9f
--- /dev/null
@@ -0,0 +1,25 @@
+;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;; *************************************************************************
+;;;; FILE IDENTIFICATION
+;;;;
+;;;; Name:          uffi-tests.asd
+;;;; Purpose:       ASDF system definitionf for uffi testing package
+;;;; Author:        Kevin M. Rosenberg
+;;;; Date Started:  Apr 2003
+;;;;
+;;;; $Id: uffi-tests.asd,v 1.1 2003/04/29 12:09:36 kevin Exp $
+;;;; *************************************************************************
+
+(defpackage #:uffi-tests-system
+  (:use #:asdf #:cl))
+(in-package #:uffi-tests-system)
+
+(defsystem uffi-tests
+    :depends-on (:rt :uffi)
+    :components ((:file "tests")))
+
+(defmethod perform ((o test-op) (c (eql (find-system :uffi-tests))))
+  (or (funcall (intern (symbol-name '#:do-tests)
+                      (find-package '#:regression-test)))
+      (error "test-op failed")))
+
index 33adcb0922acab6c29e9b798a34add65cbf006f5..40eb5bedd35ae2757305856d8073e9aaac5474bf 100644 (file)
--- a/uffi.asd
+++ b/uffi.asd
@@ -4,10 +4,10 @@
 ;;;;
 ;;;; Name:          uffi.asd
 ;;;; Purpose:       ASDF system definition file for UFFI package
-;;;; Programmer:    Kevin M. Rosenberg
+;;;; Author:        Kevin M. Rosenberg
 ;;;; Date Started:  Aug 2002
 ;;;;
-;;;; $Id: uffi.asd,v 1.23 2003/04/03 17:02:36 kevin Exp $
+;;;; $Id: uffi.asd,v 1.24 2003/04/29 12:09:36 kevin Exp $
 ;;;;
 ;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
 ;;;; *************************************************************************
 
-(declaim (optimize (debug 3) (speed 3) (safety 1) (compilation-speed 0)))
-(in-package :asdf)
+(defpackage #:uffi-system (:use #:asdf #:cl))
+(in-package #:uffi-system)
 
 #+(or allegro lispworks cmu mcl cormanlisp sbcl scl)
 (defsystem uffi
-  :name "cl-uffi"
-  :author "Kevin M. Rosenberg <kevin@rosenberg.net>"
-  :version "1.0.0"
+  :name "uffi"
+  :author "Kevin Rosenberg <kevin@rosenberg.net>"
+  :version "1.2.x"
   :maintainer "Kevin M. Rosenberg <kmr@debian.org>"
   :licence "Lessor Lisp General Public License"
   :description "Universal Foreign Function Library for Common Lisp"
   :long-description "UFFI provides a universal foreign function interface (FFI) for Common Lisp. UFFI supports CMUCL, Lispworks, and AllegroCL."
   
-  :perform (load-op :after (op uffi)
-    (pushnew :uffi cl:*features*))
-
   :components
   ((:module :src
            :components
             (:file "functions" :depends-on ("primitives"))
             (:file "libraries" :depends-on ("package"))
             (:file "os" :depends-on ("package"))))
-     ))
+   ))
+
+#+(or allegro lispworks cmu mcl cormanlisp sbcl scl)
+(defmethod perform ((o test-op) (c (eql (find-system :uffi))))
+  (oos 'load-op 'uffi-tests)
+  (oos 'test-op 'uffi-tests))
+