[csw-devel] SF.net SVN: gar:[13935] csw/mgar/pkg/ruby19/trunk
bdwalton at users.sourceforge.net
bdwalton at users.sourceforge.net
Thu Mar 24 16:58:10 CET 2011
Revision: 13935
http://gar.svn.sourceforge.net/gar/?rev=13935&view=rev
Author: bdwalton
Date: 2011-03-24 15:58:09 +0000 (Thu, 24 Mar 2011)
Log Message:
-----------
ruby19/trunk: correct two failing tests that assume LOG_PERROR (non-posix) is defined; need to send these upstream
Modified Paths:
--------------
csw/mgar/pkg/ruby19/trunk/Makefile
Added Paths:
-----------
csw/mgar/pkg/ruby19/trunk/files/0001-Use-LOG_PID-instead-of-LOG_PERROR-in-Syslog.open-tes.patch
csw/mgar/pkg/ruby19/trunk/files/0002-Skip-syslog-tests-that-rely-on-LOG_PERROR-unless-it-.patch
Modified: csw/mgar/pkg/ruby19/trunk/Makefile
===================================================================
--- csw/mgar/pkg/ruby19/trunk/Makefile 2011-03-24 15:56:19 UTC (rev 13934)
+++ csw/mgar/pkg/ruby19/trunk/Makefile 2011-03-24 15:58:09 UTC (rev 13935)
@@ -78,6 +78,9 @@
MASTER_SITES = ftp://ftp.ruby-lang.org/pub/ruby/1.9/
DISTFILES = $(DISTNAME).tar.gz
+PATCHFILES += 0001-Use-LOG_PID-instead-of-LOG_PERROR-in-Syslog.open-tes.patch
+PATCHFILES += 0002-Skip-syslog-tests-that-rely-on-LOG_PERROR-unless-it-.patch
+
# We define upstream file regex so we can be notifed of new upstream
# software release
UFILES_REGEX = $(NAME)-(\d+(?:\.\d+)*).tar.gz
Added: csw/mgar/pkg/ruby19/trunk/files/0001-Use-LOG_PID-instead-of-LOG_PERROR-in-Syslog.open-tes.patch
===================================================================
--- csw/mgar/pkg/ruby19/trunk/files/0001-Use-LOG_PID-instead-of-LOG_PERROR-in-Syslog.open-tes.patch (rev 0)
+++ csw/mgar/pkg/ruby19/trunk/files/0001-Use-LOG_PID-instead-of-LOG_PERROR-in-Syslog.open-tes.patch 2011-03-24 15:58:09 UTC (rev 13935)
@@ -0,0 +1,36 @@
+From 9da1996267eed65897a74d9bdb39e4401b156e7d Mon Sep 17 00:00:00 2001
+From: Ben Walton <bwalton at opencsw.org>
+Date: Thu, 24 Mar 2011 15:50:11 +0100
+Subject: [PATCH 1/2] Use LOG_PID instead of LOG_PERROR in Syslog.open test
+
+LOG_PERROR isn't a POSIX option for syslog, so it fails on platforms
+that don't define it. Solaris 9 and 10 are examples of this.
+
+Use LOG_PID instead.
+
+Signed-off-by: Ben Walton <bwalton at opencsw.org>
+---
+ test/test_syslog.rb | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/test/test_syslog.rb b/test/test_syslog.rb
+index c508412..265b0d7 100644
+--- a/test/test_syslog.rb
++++ b/test/test_syslog.rb
+@@ -43,10 +43,11 @@ class TestSyslog < Test::Unit::TestCase
+ Syslog.close
+
+ # given parameters
+- Syslog.open("foo", Syslog::LOG_NDELAY | Syslog::LOG_PERROR, Syslog::LOG_DAEMON)
++ options = Syslog::LOG_NDELAY | Syslog::LOG_PID
++ Syslog.open("foo", options, Syslog::LOG_DAEMON)
+
+ assert_equal('foo', Syslog.ident)
+- assert_equal(Syslog::LOG_NDELAY | Syslog::LOG_PERROR, Syslog.options)
++ assert_equal(options, Syslog.options)
+ assert_equal(Syslog::LOG_DAEMON, Syslog.facility)
+
+ Syslog.close
+--
+1.7.3.2
+
Added: csw/mgar/pkg/ruby19/trunk/files/0002-Skip-syslog-tests-that-rely-on-LOG_PERROR-unless-it-.patch
===================================================================
--- csw/mgar/pkg/ruby19/trunk/files/0002-Skip-syslog-tests-that-rely-on-LOG_PERROR-unless-it-.patch (rev 0)
+++ csw/mgar/pkg/ruby19/trunk/files/0002-Skip-syslog-tests-that-rely-on-LOG_PERROR-unless-it-.patch 2011-03-24 15:58:09 UTC (rev 13935)
@@ -0,0 +1,36 @@
+From 776853e108fef618f562297b404e9750f1beddb4 Mon Sep 17 00:00:00 2001
+From: Ben Walton <bwalton at opencsw.org>
+Date: Thu, 24 Mar 2011 16:43:41 +0100
+Subject: [PATCH 2/2] 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 at opencsw.org>
+---
+ test/test_syslog.rb | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/test/test_syslog.rb b/test/test_syslog.rb
+index 265b0d7..97b9254 100644
+--- a/test/test_syslog.rb
++++ b/test/test_syslog.rb
+@@ -135,8 +135,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)
+--
+1.7.3.2
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list