File: cffi-tests.patch

package info (click to toggle)
cffi 1%3A0.24.1-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,188 kB
  • sloc: lisp: 14,335; ansic: 859; sh: 247; makefile: 53
file content (49 lines) | stat: -rw-r--r-- 2,185 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Description: Compile test libraries in default path
 The cffi-tests system tries to compile three test shared libraries.
 By default it does so in the source directory, which is not writeable
 by the user (since it is under /usr).
 This patch changes the compilation directory to be
 *default-pathname-defaults*, so that it can be customized.
 In particular, this is used for autopkgtest (see debian/tests/runtests.lisp).
Author: Sébastien Villemot <sebastien@debian.org>
Forwarded: not-needed
Last-Update: 2018-04-01
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/cffi-tests.asd
+++ b/cffi-tests.asd
@@ -40,8 +40,8 @@
 (defmethod output-files ((o compile-op) (c c-test-lib))
   (let ((p (component-pathname c)))
     (values
-     (list (make-pathname :defaults p :type (asdf/bundle:bundle-pathname-type :object))
-           (make-pathname :defaults p :type (asdf/bundle:bundle-pathname-type :shared-library)))
+     (list (merge-pathnames (make-pathname :name (pathname-name p) :type (asdf/bundle:bundle-pathname-type :object)))
+           (merge-pathnames (make-pathname :name (pathname-name p) :type (asdf/bundle:bundle-pathname-type :shared-library))))
      t)))
 
 (defmethod perform ((o compile-op) (c c-test-lib))
--- a/tests/bindings.lisp
+++ b/tests/bindings.lisp
@@ -27,18 +27,18 @@
 
 (in-package #:cffi-tests)
 
-(define-foreign-library (libtest :type :test)
+(define-foreign-library (libtest :search-path *default-pathname-defaults* :type :test)
   (:darwin (:or "libtest.dylib" "libtest32.dylib"))
   (:unix (:or "libtest.so" "libtest32.so"))
   (:windows "libtest.dll")
   (t (:default "libtest")))
 
-(define-foreign-library (libtest2 :type :test)
+(define-foreign-library (libtest2 :search-path *default-pathname-defaults* :type :test)
   (:darwin (:or "libtest2.dylib" "libtest2_32.dylib"))
   (:unix (:or "libtest2.so" "libtest2_32.so"))
   (t (:default "libtest2")))
 
-(define-foreign-library (libfsbv :type :test)
+(define-foreign-library (libfsbv :search-path *default-pathname-defaults* :type :test)
   (:darwin (:or "libfsbv.dylib" "libfsbv32.dylib"))
   (:unix (:or "libfsbv.so" "libfsbv_32.so"))
   (:windows "libfsbv.dll")