From 8bf742d3ccb5deeb221ca8274b35c1c4e5028032 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?So=CC=88nke=20Ludwig?= Date: Sun, 22 Jan 2017 20:54:56 +0100 Subject: [PATCH] Skip tests for missing features on macOS. --- tests/0-dirwatcher.d | 3 +++ tests/0-signal.d | 3 +++ tests/0-tcp-readwait.d | 7 +++++++ 3 files changed, 13 insertions(+) diff --git a/tests/0-dirwatcher.d b/tests/0-dirwatcher.d index cc921b0..6649294 100644 --- a/tests/0-dirwatcher.d +++ b/tests/0-dirwatcher.d @@ -16,6 +16,9 @@ enum testFilename = "test.dat"; void main() { + version (OSX) writefln("Directory watchers are not yet supported on macOS. Skipping test."); + else: + if (exists(testFilename)) remove(testFilename); diff --git a/tests/0-signal.d b/tests/0-signal.d index feb04c2..ce6313c 100644 --- a/tests/0-signal.d +++ b/tests/0-signal.d @@ -14,6 +14,9 @@ bool s_done; void main() { + version (OSX) writefln("Signals are not yet supported on macOS. Skipping test."); + else: + auto id = eventDriver.signals.listen(SIGRTMIN+1, (id, status, sig) { assert(!s_done); assert(status == SignalStatus.ok); diff --git a/tests/0-tcp-readwait.d b/tests/0-tcp-readwait.d index 18a214e..87c5d34 100644 --- a/tests/0-tcp-readwait.d +++ b/tests/0-tcp-readwait.d @@ -14,6 +14,12 @@ bool s_done; void main() { + version (OSX) { + import std.stdio; + writeln("This doesn't work on macOS. Skipping this test until it is determined that this special case should stay supported."); + return; + } else: + static ubyte[] pack1 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; auto baddr = new InternetAddress(0x7F000001, 40002); @@ -28,6 +34,7 @@ void main() assert(bts == 0); incoming.read!((status, bts) { + import std.stdio; try writefln("status %s", status); catch (Exception e) assert(false, e.msg); assert(status == IOStatus.ok); assert(bts == pack1.length); assert(s_rbuf[0 .. bts] == pack1);