[libglib-perl] 06/11: Fix hang of t/9.t on FreeBSD/NetBSD perls not built with "-pthread"

Intrigeri intrigeri at moszumanska.debian.org
Thu Mar 19 13:29:28 UTC 2015


This is an automated email from the git hooks/post-receive script.

intrigeri pushed a commit to branch experimental
in repository libglib-perl.

commit 878966d5ac5f9368e4f952c88b9fe87ec5304c37
Author: Torsten Schönfeld <kaffeetisch at gmx.de>
Date:   Sat Nov 1 17:34:58 2014 +0100

    Fix hang of t/9.t on FreeBSD/NetBSD perls not built with "-pthread"
    
    Glib's child watches will not work when perl was not linked with "-pthread".
    
    https://rt.cpan.org/Ticket/Display.html?id=82349
---
 t/9.t | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/t/9.t b/t/9.t
index d067434..b394f53 100644
--- a/t/9.t
+++ b/t/9.t
@@ -210,16 +210,20 @@ if (Glib->CHECK_VERSION (2, 14, 0)) {
 
 
 {
+  my $skip_reason = undef;
   if (! $have_fork) {
-    print "ok 26 # skip, no fork: $fork_excuse\n";
-    print "ok 27 # skip\n";
-    print "ok 28 # skip\n";
-    print "ok 29 # skip\n";
-    print "ok 30 # skip\n";
-    goto SKIP_CHILD_TESTS;
+    $skip_reason = "no fork: $fork_excuse";
   }
   if (! Glib->CHECK_VERSION (2, 4, 0)) {
-    print "ok 26 # skip: need glib >= 2.4\n";
+    $skip_reason = 'need glib >= 2.4';
+  }
+  if ($^O eq 'freebsd' || $^O eq 'netbsd') {
+    if ($Config{ldflags} !~ m/-pthread\b/) {
+      $skip_reason = 'need a perl built with "-pthread" on freebsd/netbsd';
+    }
+  }
+  if (defined $skip_reason) {
+    print "ok 26 # skip: $skip_reason\n";
     print "ok 27 # skip\n";
     print "ok 28 # skip\n";
     print "ok 29 # skip\n";

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libglib-perl.git



More information about the Pkg-perl-cvs-commits mailing list