2 (eval-when (:compile-toplevel :load-toplevel :execute)
4 (defpackage #:sb-bsd-sockets-system (:use #:asdf #:sb-grovel #:cl))
5 (in-package #:sb-bsd-sockets-system)
7 (defsystem sb-bsd-sockets
9 :depends-on (sb-grovel)
10 #+sb-building-contrib :pathname
11 #+sb-building-contrib #p"SYS:CONTRIB;SB-BSD-SOCKETS;"
12 :components ((:file "defpackage")
13 (:file "split" :depends-on ("defpackage"))
16 #-win32 (sb-grovel:grovel-constants-file
19 :do-not-grovel #.(progn #-sb-building-contrib t)
20 :depends-on ("defpackage"))
21 #+win32 (sb-grovel:grovel-constants-file
24 :do-not-grovel #.(progn #-sb-building-contrib t)
25 :depends-on ("defpackage" "win32-lib"))
26 #+win32 (:file "win32-sockets"
27 :depends-on ("win32-constants"))
29 :depends-on #-win32 ("constants")
30 #+win32 ("win32-sockets"))
31 (:file "sockopt" :depends-on ("sockets"))
32 (:file "inet" :depends-on ("sockets" "split"))
33 (:file "local" :depends-on ("sockets" "split"))
34 (:file "name-service" :depends-on ("sockets"))
35 (:file "misc" :depends-on ("sockets"))
38 ;; (:static-file "INSTALL")
39 ;; (:static-file "README")
40 ;; (:static-file "index" :pathname "index.html")
41 (:static-file "TODO")))
43 (defmethod perform :after ((o load-op) (c (eql (find-system :sb-bsd-sockets))))
44 (provide 'sb-bsd-sockets))
46 (defmethod perform ((o test-op) (c (eql (find-system :sb-bsd-sockets))))
47 (operate 'load-op 'sb-bsd-sockets-tests)
48 (operate 'test-op 'sb-bsd-sockets-tests))
50 (defsystem sb-bsd-sockets-tests
51 :depends-on (sb-rt sb-bsd-sockets #-win32 sb-posix)
52 :components ((:file "tests")))
54 (defmethod perform ((o test-op) (c (eql (find-system :sb-bsd-sockets-tests))))
55 (multiple-value-bind (soft strict pending)
56 (funcall (intern "DO-TESTS" (find-package "SB-RT")))
57 (declare (ignorable pending))
61 ;; We create TEST-PASSED from a shell script if tests passed. But
62 ;; since the shell script only `touch'es it, we can actually create
63 ;; it ahead of time -- as long as we're certain that tests truly
64 ;; passed, hence the check for SOFT.
66 (with-open-file (s #p"SYS:CONTRIB;SB-BSD-SOCKETS;TEST-PASSED"
68 (dolist (pend pending)
69 (format s "Expected failure: ~A~%" pend))))
70 (warn "ignoring expected failures in test-op"))
72 (error "test-op failed with unexpected failures"))))