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

intrigeri pushed a commit to annotated tag rel-1-24-94
in repository libgtk2-perl.

commit 4128c861e6650a64b5cf1830248357fb7e9c3284
Author: Torsten Schönfeld <kaffeeti...@gmx.de>
Date:   Sat Nov 29 19:20:13 2014 +0100

    Skip all tests that use threads under the hood on FreeBSD if necessary
    
    On FreeBSD, perl must be compiled with "-pthread" in order to allow loaded
    libraries to use threads.  Hence, skip the GtkRecent* and GtkFileChooser* 
tests
    if this is not the case.
---
 t/GtkFileChooserButton.t   | 14 +++++++++++++-
 t/GtkFileChooserDialog.t   | 13 ++++++++++++-
 t/GtkFileChooserWidget.t   | 13 ++++++++++++-
 t/GtkRecentAction.t        | 16 +++++++++++++---
 t/GtkRecentChooser.t       | 14 +++++++++++++-
 t/GtkRecentChooserDialog.t | 14 +++++++++++++-
 t/GtkRecentChooserMenu.t   | 14 +++++++++++++-
 t/GtkRecentChooserWidget.t | 14 +++++++++++++-
 t/GtkRecentFilter.t        | 14 +++++++++++++-
 t/GtkRecentManager.t       | 11 +++++++++++
 10 files changed, 126 insertions(+), 11 deletions(-)

diff --git a/t/GtkFileChooserButton.t b/t/GtkFileChooserButton.t
index 33978dd..bd84577 100644
--- a/t/GtkFileChooserButton.t
+++ b/t/GtkFileChooserButton.t
@@ -1,8 +1,20 @@
 #!/usr/bin/perl -w
 use strict;
+
+sub on_unthreaded_freebsd {
+  if ($^O eq 'freebsd') {
+    require Config;
+    if ($Config::Config{ldflags} !~ m/-pthread\b/) {
+      return 1;
+    }
+  }
+  return 0;
+}
+
 use Gtk2::TestHelper
   tests => 9,
-  at_least_version => [2, 6, 0, "GtkFileChooserButton is new in 2.6"];
+  at_least_version => [2, 6, 0, "GtkFileChooserButton is new in 2.6"],
+  (on_unthreaded_freebsd () ? (skip_all => 'need a perl compiled with 
"-pthread" on freebsd') : ());
 
 # $Id$
 
diff --git a/t/GtkFileChooserDialog.t b/t/GtkFileChooserDialog.t
index 019f3cf..58364c1 100644
--- a/t/GtkFileChooserDialog.t
+++ b/t/GtkFileChooserDialog.t
@@ -2,9 +2,20 @@
 # $Id$
 #
 
+sub on_unthreaded_freebsd {
+  if ($^O eq 'freebsd') {
+    require Config;
+    if ($Config::Config{ldflags} !~ m/-pthread\b/) {
+      return 1;
+    }
+  }
+  return 0;
+}
+
 use Gtk2::TestHelper
        at_least_version => [2, 4, 0, "GtkFileChooser is new in 2.4"],
-       tests => 6;
+       tests => 6,
+       (on_unthreaded_freebsd () ? (skip_all => 'need a perl compiled with 
"-pthread" on freebsd') : ());
 
 
 my $dialog = Gtk2::FileChooserDialog->new ('some title', undef, 'save',
diff --git a/t/GtkFileChooserWidget.t b/t/GtkFileChooserWidget.t
index b745b6f..20c80f0 100644
--- a/t/GtkFileChooserWidget.t
+++ b/t/GtkFileChooserWidget.t
@@ -2,9 +2,20 @@
 # $Id$
 #
 
+sub on_unthreaded_freebsd {
+  if ($^O eq 'freebsd') {
+    require Config;
+    if ($Config::Config{ldflags} !~ m/-pthread\b/) {
+      return 1;
+    }
+  }
+  return 0;
+}
+
 use Gtk2::TestHelper
        at_least_version => [2, 4, 0, "GtkFileChooser is new in 2.4"],
-       tests => 6;
+       tests => 6,
+       (on_unthreaded_freebsd () ? (skip_all => 'need a perl compiled with 
"-pthread" on freebsd') : ());
 
 
 my $widget = Gtk2::FileChooserWidget->new ('save');
diff --git a/t/GtkRecentAction.t b/t/GtkRecentAction.t
index b70b877..f0bb764 100644
--- a/t/GtkRecentAction.t
+++ b/t/GtkRecentAction.t
@@ -2,10 +2,20 @@
 
 # $Id$
 
-use Gtk2::TestHelper
-       at_least_version => [2, 12, 0, 'GtkRecentAtionc: new in 2.12'],
-       tests => 1;
+sub on_unthreaded_freebsd {
+  if ($^O eq 'freebsd') {
+    require Config;
+    if ($Config::Config{ldflags} !~ m/-pthread\b/) {
+      return 1;
+    }
+  }
+  return 0;
+}
 
+use Gtk2::TestHelper
+       at_least_version => [2, 12, 0, 'GtkRecentAction: new in 2.12'],
+       tests => 1,
+       (on_unthreaded_freebsd () ? (skip_all => 'need a perl compiled with 
"-pthread" on freebsd') : ());
 
 my $action = Gtk2::RecentAction->new (name => 'one',
                                       label => 'one',
diff --git a/t/GtkRecentChooser.t b/t/GtkRecentChooser.t
index dfd78f6..39268df 100644
--- a/t/GtkRecentChooser.t
+++ b/t/GtkRecentChooser.t
@@ -1,8 +1,20 @@
 #!/usr/bin/perl -w
 use strict;
+
+sub on_unthreaded_freebsd {
+  if ($^O eq 'freebsd') {
+    require Config;
+    if ($Config::Config{ldflags} !~ m/-pthread\b/) {
+      return 1;
+    }
+  }
+  return 0;
+}
+
 use Gtk2::TestHelper
   tests => 15,
-  at_least_version => [2, 10, 0, "GtkRecentChooser"];
+  at_least_version => [2, 10, 0, "GtkRecentChooser"],
+  (on_unthreaded_freebsd () ? (skip_all => 'need a perl compiled with 
"-pthread" on freebsd') : ());
 
 # $Id$
 
diff --git a/t/GtkRecentChooserDialog.t b/t/GtkRecentChooserDialog.t
index 3087f6b..bab2d79 100644
--- a/t/GtkRecentChooserDialog.t
+++ b/t/GtkRecentChooserDialog.t
@@ -1,8 +1,20 @@
 #!/usr/bin/perl -w
 use strict;
+
+sub on_unthreaded_freebsd {
+  if ($^O eq 'freebsd') {
+    require Config;
+    if ($Config::Config{ldflags} !~ m/-pthread\b/) {
+      return 1;
+    }
+  }
+  return 0;
+}
+
 use Gtk2::TestHelper
   tests => 14,
-  at_least_version => [2, 10, 0, "GtkRecentChooserDialog"];
+  at_least_version => [2, 10, 0, "GtkRecentChooserDialog"],
+  (on_unthreaded_freebsd () ? (skip_all => 'need a perl compiled with 
"-pthread" on freebsd') : ());
 
 # $Id$
 
diff --git a/t/GtkRecentChooserMenu.t b/t/GtkRecentChooserMenu.t
index 032a1b3..da7fc45 100644
--- a/t/GtkRecentChooserMenu.t
+++ b/t/GtkRecentChooserMenu.t
@@ -1,8 +1,20 @@
 #!/usr/bin/perl -w
 use strict;
+
+sub on_unthreaded_freebsd {
+  if ($^O eq 'freebsd') {
+    require Config;
+    if ($Config::Config{ldflags} !~ m/-pthread\b/) {
+      return 1;
+    }
+  }
+  return 0;
+}
+
 use Gtk2::TestHelper
   tests => 5,
-  at_least_version => [2, 10, 0, "GtkRecentChooserMenu"];
+  at_least_version => [2, 10, 0, "GtkRecentChooserMenu"],
+  (on_unthreaded_freebsd () ? (skip_all => 'need a perl compiled with 
"-pthread" on freebsd') : ());
 
 # $Id$
 
diff --git a/t/GtkRecentChooserWidget.t b/t/GtkRecentChooserWidget.t
index 4e6fe7b..675670c 100644
--- a/t/GtkRecentChooserWidget.t
+++ b/t/GtkRecentChooserWidget.t
@@ -1,8 +1,20 @@
 #!/usr/bin/perl -w
 use strict;
+
+sub on_unthreaded_freebsd {
+  if ($^O eq 'freebsd') {
+    require Config;
+    if ($Config::Config{ldflags} !~ m/-pthread\b/) {
+      return 1;
+    }
+  }
+  return 0;
+}
+
 use Gtk2::TestHelper
   tests => 4,
-  at_least_version => [2, 10, 0, "GtkRecentChooserWidget"];
+  at_least_version => [2, 10, 0, "GtkRecentChooserWidget"],
+  (on_unthreaded_freebsd () ? (skip_all => 'need a perl compiled with 
"-pthread" on freebsd') : ());
 
 # $Id$
 
diff --git a/t/GtkRecentFilter.t b/t/GtkRecentFilter.t
index fe64056..74d9367 100644
--- a/t/GtkRecentFilter.t
+++ b/t/GtkRecentFilter.t
@@ -1,8 +1,20 @@
 #!/usr/bin/perl -w
 use strict;
+
+sub on_unthreaded_freebsd {
+  if ($^O eq 'freebsd') {
+    require Config;
+    if ($Config::Config{ldflags} !~ m/-pthread\b/) {
+      return 1;
+    }
+  }
+  return 0;
+}
+
 use Gtk2::TestHelper
   tests => 13,
-  at_least_version => [2, 10, 0, "GtkRecentFilter"];
+  at_least_version => [2, 10, 0, "GtkRecentFilter"],
+  (on_unthreaded_freebsd () ? (skip_all => 'need a perl compiled with 
"-pthread" on freebsd') : ());
 
 # $Id$
 
diff --git a/t/GtkRecentManager.t b/t/GtkRecentManager.t
index e0cacab..5d39eef 100644
--- a/t/GtkRecentManager.t
+++ b/t/GtkRecentManager.t
@@ -16,8 +16,19 @@ use File::Basename qw(basename);
 use File::Temp qw(tempdir);
 my $dir = tempdir(CLEANUP => 1);
 
+sub on_unthreaded_freebsd {
+  if ($^O eq 'freebsd') {
+    require Config;
+    if ($Config::Config{ldflags} !~ m/-pthread\b/) {
+      return 1;
+    }
+  }
+  return 0;
+}
+
 use Gtk2::TestHelper tests => 36,
     at_least_version => [2, 10, 0, "GtkRecentManager is new in 2.10"],
+    (on_unthreaded_freebsd () ? (skip_all => 'need a perl compiled with 
"-pthread" on freebsd') : ()),
     ;
 
 my $manager = Gtk2::RecentManager->get_default;

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

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to