From c8b71999fd488e73ea2c673e3c34245d45238f51 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Fri, 7 Feb 2003 17:35:31 +0000 Subject: [PATCH] 0.7.12.29 Cleaned up sb-bsd-sockets ... ... some package renaming missed last time ... 'make test' now actually runs the test scripts instead of just returning successfully --- contrib/sb-bsd-sockets/Makefile | 11 +++++++---- contrib/sb-bsd-sockets/sb-bsd-sockets.asd | 7 ++++--- contrib/sb-bsd-sockets/tests.lisp | 7 ++++++- version.lisp-expr | 2 +- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/contrib/sb-bsd-sockets/Makefile b/contrib/sb-bsd-sockets/Makefile index 42a6e8e..d9ca28f 100644 --- a/contrib/sb-bsd-sockets/Makefile +++ b/contrib/sb-bsd-sockets/Makefile @@ -1,13 +1,16 @@ -SYSTEM=bsd-sockets +SYSTEM=sb-bsd-sockets all: $(MAKE) -C ../asdf echo "(asdf:operate 'asdf:load-op :$(SYSTEM))" | \ $(SBCL) --eval '(load "../asdf/asdf")' -test: - true +test: all + echo "(asdf:operate 'asdf:load-op :$(SYSTEM)) \ + (or (rt:do-tests) (error \"test failed, cannot install\"))" | \ + $(SBCL) --eval '(load "../asdf/asdf")' + -install: all +install: test tar cf - . | ( cd $(INSTALL_DIR) && tar xpvf - ) ( cd $(SBCL_HOME)/systems && ln -fs ../$(SYSTEM)/$(SYSTEM).asd . ) diff --git a/contrib/sb-bsd-sockets/sb-bsd-sockets.asd b/contrib/sb-bsd-sockets/sb-bsd-sockets.asd index e259756..f2bb859 100644 --- a/contrib/sb-bsd-sockets/sb-bsd-sockets.asd +++ b/contrib/sb-bsd-sockets/sb-bsd-sockets.asd @@ -24,8 +24,9 @@ (princ (list filename output-file real-output-file tmp-c-source tmp-a-dot-out tmp-constants)) (terpri) - (funcall (intern "C-CONSTANTS-EXTRACT" (find-package "BSD-SOCKETS-SYSTEM")) - filename tmp-c-source :bsd-sockets-internal) + (funcall (intern "C-CONSTANTS-EXTRACT" + (find-package "SB-BSD-SOCKETS-SYSTEM")) + filename tmp-c-source :sb-bsd-sockets-internal) (and (= (run-shell-command "/usr/bin/gcc -o ~S ~S" (namestring tmp-a-dot-out) @@ -91,7 +92,7 @@ #+cmu (ext:load-foreign filename) #+sbcl (sb-alien:load-1-foreign filename)))) -(defsystem bsd-sockets +(defsystem sb-bsd-sockets :version "0.58" :components ((:file "defpackage" :depends-on ("rt")) (:file "split" :depends-on ("defpackage")) diff --git a/contrib/sb-bsd-sockets/tests.lisp b/contrib/sb-bsd-sockets/tests.lisp index 22512f5..40af6c2 100644 --- a/contrib/sb-bsd-sockets/tests.lisp +++ b/contrib/sb-bsd-sockets/tests.lisp @@ -103,7 +103,7 @@ Tests are in the file tests.lisp and also make good examples. (setf (elt buffer i) c)))) ;;; these require that the echo services are turned on in inetd - +#+internet-available (deftest simple-tcp-client (let ((s (make-instance 'inet-socket :type :stream :protocol :tcp)) (data (make-string 200))) @@ -115,6 +115,7 @@ Tests are in the file tests.lisp and also make good examples. (> (length data) 0)))) t) +#+internet-available (deftest simple-udp-client (let ((s (make-instance 'inet-socket :type :datagram :protocol (get-protocol-by-name "udp"))) (data (make-string 200))) @@ -148,11 +149,13 @@ message. Priority 7 is kern.debug; you'll probably want to look at ;;; these require that the internet (or bits of it, atleast) is available +#+internet-available (deftest get-host-by-name (equalp (car (host-ent-addresses (get-host-by-name "a.root-servers.net"))) #(198 41 0 4)) t) +#+internet-available (deftest get-host-by-address (host-ent-name (get-host-by-address #(198 41 0 4))) "a.root-servers.net") @@ -172,6 +175,7 @@ message. Priority 7 is kern.debug; you'll probably want to look at (format stream "~A HTTP/1.0~%~%" request)) s)) +#+internet-available (deftest simple-http-client-1 (handler-case (let ((s (http-stream "ww.telent.net" 80 "HEAD /"))) @@ -185,6 +189,7 @@ message. Priority 7 is kern.debug; you'll probably want to look at t) +#+internet-available (deftest sockopt-receive-buffer ;; on Linux x86, the receive buffer size appears to be doubled in the ;; kernel: we set a size of x and then getsockopt() returns 2x. diff --git a/version.lisp-expr b/version.lisp-expr index 98410f1..5eb536a 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -18,4 +18,4 @@ ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.7.12.28" +"0.7.12.29" -- 1.7.10.4