mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Skip syslog tests that rely on LOG_PERROR unless it's defined
Instead of checking looking at the platform to determine if the tests relying on LOG_PERROR should be run, look for the definition of the constant as this will be robust against all platforms as long as the underlying syslog.c code sets it up correctly. This specifically addresses failures on Solaris 9. Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca> Signed-off-by: URABE, Shyouhei <shyouhei@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d711cde778
commit
bb41909d8b
1 changed files with 3 additions and 2 deletions
|
@ -140,8 +140,9 @@ class TestSyslog < Test::Unit::TestCase
|
|||
stderr[1].close
|
||||
Process.waitpid(pid)
|
||||
|
||||
# LOG_PERROR is not yet implemented on Cygwin.
|
||||
return if RUBY_PLATFORM =~ /cygwin/
|
||||
# LOG_PERROR is not implemented on Cygwin or Solaris. Only test
|
||||
# these on systems that define it.
|
||||
return unless Syslog.const_defined?(:LOG_PERROR)
|
||||
|
||||
2.times {
|
||||
assert_equal("syslog_test: test1 - hello, world!\n", stderr[0].gets)
|
||||
|
|
Loading…
Reference in a new issue