From: Kurt D. Starsinic Date: Wed, 25 Oct 2000 12:13:54 +0000 (-0400) Subject: A new version of making the syslog test more robust. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f41ed1f750631f0a9e5dcf335ee0828decfbbc66;p=p5sagit%2Fp5-mst-13.2.git A new version of making the syslog test more robust. (Replaces #7421.) Subject: Re: [ID 20001022.001] Not OK: perl v5.7.0 +DEVEL7368 on i686-linux 2.2.16 Message-ID: <20001025121354.B2264@O2.chapin.edu> p4raw-id: //depot/perl@7440 --- diff --git a/t/lib/syslog.t b/t/lib/syslog.t index 14f789a..d73e973 100755 --- a/t/lib/syslog.t +++ b/t/lib/syslog.t @@ -14,10 +14,20 @@ use Sys::Syslog qw(:DEFAULT setlogsock); print "1..6\n"; -if (Sys::Syslog::_PATH_LOG() and -e Sys::Syslog::_PATH_LOG()) { - print defined(eval { setlogsock('unix') }) ? "ok 1\n" : "not ok 1\n"; - print defined(eval { openlog('perl', 'ndelay', 'local0') }) ? "ok 2\n" : "not ok 2\n"; - print defined(eval { syslog('info', 'test') }) ? "ok 3\n" : "not ok 3\n"; +if (Sys::Syslog::_PATH_LOG()) { + if (-e Sys::Syslog::_PATH_LOG()) { + print defined(eval { setlogsock('unix') }) ? "ok 1\n" : "not ok 1\n"; + print defined(eval { openlog('perl', 'ndelay', 'local0') }) ? "ok 2\n" : "not ok 2\n"; + print defined(eval { syslog('info', 'test') }) ? "ok 3\n" : "not ok 3\n"; + } + else { + for (1..3) { + print + "ok $_ # skipping, file ", + Sys::Syslog::_PATH_LOG(), + " does not exist\n"; + } + } } else { for (1..3) { print "ok $_ # skipping, _PATH_LOG unavailable\n" }