diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/014/dgram-stream.tl | 2 | ||||
-rw-r--r-- | tests/common.tl | 12 |
2 files changed, 10 insertions, 4 deletions
diff --git a/tests/014/dgram-stream.tl b/tests/014/dgram-stream.tl index b2ac1165..5902a84d 100644 --- a/tests/014/dgram-stream.tl +++ b/tests/014/dgram-stream.tl @@ -35,7 +35,7 @@ (if (and (fboundp 'open-socket) (fboundp 'fork)) - (let ((maybe-ipv6 (if (memqual (osname) '("GNU/Linux" "Darwin" "Cygwin")) + (let ((maybe-ipv6 (if (memq (os-symbol) '(:linux :macos :cygwin :cygnal)) (list af-inet6)))) (each ((family ^(,af-inet ,*maybe-ipv6))) (unless (dgram-test) diff --git a/tests/common.tl b/tests/common.tl index c0dda285..a61c0ff1 100644 --- a/tests/common.tl +++ b/tests/common.tl @@ -23,6 +23,12 @@ (defmacro mtest (. pairs) ^(progn ,*(mapcar (op cons 'test) (tuples 2 pairs)))) -(defun osname () - (with-stream (u (open-command "(uname -o || uname) 2> /dev/null")) - (get-line u))) +(defun os-symbol () + (let ((u (uname))) + [(orf (iff (f^ #/Linux/) (ret :linux)) + (iff (f^ #/SunOS/) (ret :solaris)) + (iff (f^ #/CYGWIN/) (ret :cygwin)) + (iff (f^ #/CYGNAL/) (ret :cygnal)) + (iff (f^ #/Darwin/) (ret :macos)) + (ret :unknown)) + u.sysname])) |