[perl-Glib] Fix hang of t/9.t on FreeBSD/NetBSD perls not built with "-pthread"
- From: Torsten Schönfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Glib] Fix hang of t/9.t on FreeBSD/NetBSD perls not built with "-pthread"
- Date: Sat, 29 Nov 2014 17:04:46 +0000 (UTC)
commit 878966d5ac5f9368e4f952c88b9fe87ec5304c37
Author: Torsten Schönfeld <kaffeetisch 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 files 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";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]