On Fri, Aug 15, 2014 at 01:07:27AM +0300, Niko Tyni wrote:

> The current plan for libwx-perl is to fix the test suite not to crash
> but skip the failing tests, and then downgrade this to 'important'. The
> attached patches are a first stab at this. I ran out of time tonight and
> haven't even run a full 'make test' with these yet, but I don't really
> expect problems.

Revised patches attached. The first one could be pushed upstream, the
others are temporary workarounds. I was able to get the beast to build
on harris (armhf) with these.

The workaround for ext/propgrid isn't particularly elegant, but it's
the best I could come up with.
-- 
Niko Tyni   nt...@debian.org
>From 067aacc2dc8ab1b02286693656df801e08dec49e Mon Sep 17 00:00:00 2001
From: Niko Tyni <nt...@debian.org>
Date: Thu, 14 Aug 2014 21:50:00 +0000
Subject: [PATCH 1/3] Fix Wx::_load_plugin() segfaulting when
 wxPluginManager::LoadLibrary fails

It would be nice to also signal an error message upwards in the caller
stack, but I can't see an easy way to set dl_last_error in DynaLoader
from here.

Bug-Debian: https://bugs.debian.org/758127
---
 Wx.xs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Wx.xs b/Wx.xs
index 01029fc..3f5dede 100644
--- a/Wx.xs
+++ b/Wx.xs
@@ -422,7 +422,10 @@ _load_plugin( string, int flags = 0 /* to be compatible with dl_load_file */ )
 #endif
 #endif
     wxDynamicLibrary *lib = wxPluginManager::LoadLibrary( string, wxDL_VERBATIM );
-    RETVAL = PTR2IV( lib->GetLibHandle() );
+    if (lib)
+        RETVAL = PTR2IV( lib->GetLibHandle() );
+    else
+        RETVAL = 0;
   OUTPUT:
     RETVAL
 
-- 
2.1.0.rc1

>From 20880ed3c176b400df548c84db13355c7c7007e4 Mon Sep 17 00:00:00 2001
From: Niko Tyni <nt...@debian.org>
Date: Thu, 14 Aug 2014 22:02:18 +0000
Subject: [PATCH 2/3] Temporarily skip tests in t/01_load.t when 'use Wx
 qw(:allclasses)' fails

This is a workaround for wxwidgets3.0 breakage, see
https://bugs.debian.org/758127
---
 t/01_load.t | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/t/01_load.t b/t/01_load.t
index 2237a97..c4042c9 100755
--- a/t/01_load.t
+++ b/t/01_load.t
@@ -11,7 +11,8 @@ my $x = wxYES;
 ok( 1, "Exported constant" );
 
 SKIP: {
-  use Wx qw(:frame :allclasses wxNO_3D wxTAB_TRAVERSAL);
+  eval "use Wx qw(:frame :allclasses wxNO_3D wxTAB_TRAVERSAL)";
+  skip("loading :allclasses et al. failed: $@", 2) if $@;
 
   $x = wxTAB_TRAVERSAL();
   $x = wxCAPTION();
-- 
2.1.0.rc1

>From fe7b1b7b6630b30ad652e93caa1d2acb9e837994 Mon Sep 17 00:00:00 2001
From: Niko Tyni <nt...@debian.org>
Date: Sat, 16 Aug 2014 07:11:51 +0000
Subject: [PATCH 3/3] Temporarily skip all ext/propgrid tests

This is a workaround for for wxwidgets3.0 breakage, see
https://bugs.debian.org/758127
---
 ext/propgrid/Makefile.PL | 2 ++
 ext/propgrid/faketest    | 2 ++
 2 files changed, 4 insertions(+)
 create mode 100755 ext/propgrid/faketest

diff --git a/ext/propgrid/Makefile.PL b/ext/propgrid/Makefile.PL
index 093817d..80e0718 100644
--- a/ext/propgrid/Makefile.PL
+++ b/ext/propgrid/Makefile.PL
@@ -22,4 +22,6 @@ wxWriteMakefile( NAME         => 'Wx::PropertyGrid',
                  WX_CORE_LIB  => 'propgrid adv core base',
                  REQUIRE_WX_LIB  => 'propgrid',
                  NO_WX_PLATFORMS => [ ],
+                 # temporary workaround for https://bugs.debian.org/758127
+                 test => { TESTS => ($Config{archname} =~ /^arm/ ? 'faketest' : 't/*.t') },
                );
\ No newline at end of file
diff --git a/ext/propgrid/faketest b/ext/propgrid/faketest
new file mode 100755
index 0000000..83f7d05
--- /dev/null
+++ b/ext/propgrid/faketest
@@ -0,0 +1,2 @@
+#!/bin/sh
+echo 1..0
-- 
2.1.0.rc1

Reply via email to