summaryrefslogtreecommitdiffstats
path: root/tests/common.tl
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-03-10 06:49:57 -0800
committerKaz Kylheku <kaz@kylheku.com>2016-03-10 06:49:57 -0800
commita6551d3c4b832ef4b724e6039c615dfd56d76b7e (patch)
tree34a04280205ef50086e6e69c6f61772e9ddb3dd6 /tests/common.tl
parent8bc6ba624272e9df414358195025cd696c491ad9 (diff)
downloadtxr-a6551d3c4b832ef4b724e6039c615dfd56d76b7e.tar.gz
txr-a6551d3c4b832ef4b724e6039c615dfd56d76b7e.tar.bz2
txr-a6551d3c4b832ef4b724e6039c615dfd56d76b7e.zip
Run IPv6 tests only on some operating systems.
* tests/014/dgram-stream.tl (test): Renamed to dgram-test since now this includes common.tl which has a macro called test. Only include af-inet6 in the family list if the OS is GNU/Linux, Darwin or Cygwin. * tests/common.tl (osname): New function.
Diffstat (limited to 'tests/common.tl')
-rw-r--r--tests/common.tl4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/common.tl b/tests/common.tl
index 301a5402..ea2be1d5 100644
--- a/tests/common.tl
+++ b/tests/common.tl
@@ -19,3 +19,7 @@
(defmacro stest (expr expected)
^(vtest ,^(tostring ,expr) ,expected))
+
+(defun osname ()
+ (with-stream (u (open-command "(uname -o || uname) 2> /dev/null"))
+ (get-line u)))