| tcffi-tests.asd - clic - Clic is an command line interactive client for gopher … | |
| git clone git://bitreich.org/clic/ git://hg6vgqziawt5s4dj.onion/clic/ | |
| Log | |
| Files | |
| Refs | |
| Tags | |
| LICENSE | |
| --- | |
| tcffi-tests.asd (3798B) | |
| --- | |
| 1 ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- | |
| 2 ;;; | |
| 3 ;;; cffi-tests.asd --- ASDF system definition for CFFI unit tests. | |
| 4 ;;; | |
| 5 ;;; Copyright (C) 2005-2006, James Bielman <[email protected]> | |
| 6 ;;; Copyright (C) 2005-2011, Luis Oliveira <[email protected]> | |
| 7 ;;; | |
| 8 ;;; Permission is hereby granted, free of charge, to any person | |
| 9 ;;; obtaining a copy of this software and associated documentation | |
| 10 ;;; files (the "Software"), to deal in the Software without | |
| 11 ;;; restriction, including without limitation the rights to use, copy, | |
| 12 ;;; modify, merge, publish, distribute, sublicense, and/or sell copies | |
| 13 ;;; of the Software, and to permit persons to whom the Software is | |
| 14 ;;; furnished to do so, subject to the following conditions: | |
| 15 ;;; | |
| 16 ;;; The above copyright notice and this permission notice shall be | |
| 17 ;;; included in all copies or substantial portions of the Software. | |
| 18 ;;; | |
| 19 ;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
| 20 ;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
| 21 ;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
| 22 ;;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | |
| 23 ;;; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | |
| 24 ;;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
| 25 ;;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |
| 26 ;;; DEALINGS IN THE SOFTWARE. | |
| 27 ;;; | |
| 28 | |
| 29 (load-systems "trivial-features" "cffi-grovel") | |
| 30 | |
| 31 (defclass c-test-lib (c-source-file) | |
| 32 ()) | |
| 33 | |
| 34 (defmethod perform ((o load-op) (c c-test-lib)) | |
| 35 nil) | |
| 36 | |
| 37 (defmethod perform ((o load-source-op) (c c-test-lib)) | |
| 38 nil) | |
| 39 | |
| 40 (defmethod output-files ((o compile-op) (c c-test-lib)) | |
| 41 (let ((p (component-pathname c))) | |
| 42 (values | |
| 43 (list (make-pathname :defaults p :type (asdf/bundle:bundle-pathname… | |
| 44 (make-pathname :defaults p :type (asdf/bundle:bundle-pathname… | |
| 45 t))) | |
| 46 | |
| 47 (defmethod perform ((o compile-op) (c c-test-lib)) | |
| 48 (let ((cffi-toolchain:*cc-flags* `(,@cffi-toolchain:*cc-flags* "-Wall"… | |
| 49 (destructuring-bind (obj dll) (output-files o c) | |
| 50 (cffi-toolchain:cc-compile obj (input-files o c)) | |
| 51 (cffi-toolchain:link-shared-library dll (list obj))))) | |
| 52 | |
| 53 (defsystem "cffi-tests" | |
| 54 :description "Unit tests for CFFI." | |
| 55 :depends-on ("cffi-grovel" "cffi-libffi" "bordeaux-threads" #-ecl "rt"… | |
| 56 :components | |
| 57 ((:module "tests" | |
| 58 :components | |
| 59 ((:c-test-lib "libtest") | |
| 60 (:c-test-lib "libtest2") | |
| 61 (:c-test-lib "libfsbv") | |
| 62 (:file "package") | |
| 63 (:file "bindings" :depends-on ("package" "libtest" "libtest2" "libf… | |
| 64 (:file "funcall" :depends-on ("bindings")) | |
| 65 (:file "defcfun" :depends-on ("bindings")) | |
| 66 (:file "callbacks" :depends-on ("bindings")) | |
| 67 (:file "foreign-globals" :depends-on ("package")) | |
| 68 (:file "memory" :depends-on ("package")) | |
| 69 (:file "strings" :depends-on ("package")) | |
| 70 (:file "arrays" :depends-on ("package")) | |
| 71 (:file "struct" :depends-on ("package")) | |
| 72 (:file "union" :depends-on ("package")) | |
| 73 (:file "enum" :depends-on ("package")) | |
| 74 (:file "fsbv" :depends-on ("bindings" "enum")) | |
| 75 (:file "misc-types" :depends-on ("bindings")) | |
| 76 (:file "misc" :depends-on ("bindings")) | |
| 77 (:file "test-asdf" :depends-on ("package")) | |
| 78 (:file "grovel" :depends-on ("package"))))) | |
| 79 :perform (test-op (o c) (symbol-call :cffi-tests '#:run-all-cffi-tests… | |
| 80 | |
| 81 (defsystem "cffi-tests/example" | |
| 82 :defsystem-depends-on ("cffi-grovel") | |
| 83 :entry-point "cffi-example::entry-point" | |
| 84 :components | |
| 85 ((:module "examples" :components | |
| 86 ((:file "package") | |
| 87 (:cffi-wrapper-file "wrapper-example" :depends-on ("package")) | |
| 88 (:cffi-grovel-file "grovel-example" :depends-on ("package")) | |
| 89 (:file "main-example" :depends-on ("package")))))) | |
| 90 | |
| 91 ;;; vim: ft=lisp et |