Subject: | [PATCH] skip tests when /dev/log is unavailable |
Date: | Sun, 30 Dec 2007 22:32:44 +1100 |
To: | bug-sys-syslog [...] rt.cpan.org |
From: | Brendan O'Dea <bod [...] debian.org> |
Test 176 fails when /dev/log is unavailable. See http://bugs.debian.org/457760
--bod
--- perl-5.10.x/ext/Sys/Syslog/t/syslog.t 2007-12-25 06:44:23.000000000 +1100
+++ perl-5.10.0/ext/Sys/Syslog/t/syslog.t 2007-12-30 12:59:57.000000000 +1100
@@ -189,6 +189,9 @@
skip "the 'unix' mechanism works, so the tests will likely fail with the 'stream' mechanism", 10
if grep {/unix/} @passed;
+ skip "can't connect to Unix socket: _PATH_LOG unavailable", 10
+ unless -e Sys::Syslog::_PATH_LOG();
+
# setlogsock() with "stream" and an undef path
$r = eval { setlogsock("stream", undef ) } || '';
is( $@, '', "setlogsock() called, with 'stream' and an undef path" );