ruby-changes:19140
From: shyouhei <ko1@a...>
Date: Fri, 25 Mar 2011 20:10:14 +0900 (JST)
Subject: [ruby-changes:19140] Ruby:r31178 (trunk): Skip syslog tests that rely on LOG_PERROR unless it's defined
shyouhei 2011-03-25 20:06:57 +0900 (Fri, 25 Mar 2011) New Revision: 31178 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=31178 Log: 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@a...> Signed-off-by: URABE, Shyouhei <shyouhei@r...> Modified files: trunk/test/test_syslog.rb Index: test/test_syslog.rb =================================================================== --- test/test_syslog.rb (revision 31177) +++ test/test_syslog.rb (revision 31178) @@ -140,8 +140,9 @@ 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) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/