r28920 - in /trunk/libpango-perl/debian/patches: ./ series skip-tests-when-theres-no-x
ryan52-guest at users.alioth.debian.org
ryan52-guest at users.alioth.debian.org
Mon Dec 29 06:08:29 UTC 2008
Author: ryan52-guest
Date: Mon Dec 29 06:08:21 2008
New Revision: 28920
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=28920
Log:
don't try to load gtk when DISPLAY isn't set, as this causes errors
Added:
trunk/libpango-perl/debian/patches/
trunk/libpango-perl/debian/patches/series
trunk/libpango-perl/debian/patches/skip-tests-when-theres-no-x
Added: trunk/libpango-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpango-perl/debian/patches/series?rev=28920&op=file
==============================================================================
--- trunk/libpango-perl/debian/patches/series (added)
+++ trunk/libpango-perl/debian/patches/series Mon Dec 29 06:08:21 2008
@@ -1,0 +1,1 @@
+skip-tests-when-theres-no-x
Added: trunk/libpango-perl/debian/patches/skip-tests-when-theres-no-x
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpango-perl/debian/patches/skip-tests-when-theres-no-x?rev=28920&op=file
==============================================================================
--- trunk/libpango-perl/debian/patches/skip-tests-when-theres-no-x (added)
+++ trunk/libpango-perl/debian/patches/skip-tests-when-theres-no-x Mon Dec 29 06:08:21 2008
@@ -1,0 +1,19 @@
+--- a/t/inc/PangoTestHelper.pm
++++ b/t/inc/PangoTestHelper.pm
+@@ -9,9 +9,13 @@
+ my %options = @_;
+
+ if ($options{need_gtk}) {
+- unless (eval "use Gtk2 $REQ_GTK2_VERSION -init; 1;") {
+- plan skip_all => "This test needs Gtk2 >= $REQ_GTK2_VERSION";
+- }
++ if(!$ENV{"DISPLAY"} || length($ENV{"DISPLAY"}) == 0) {
++ plan skip_all => "DISPLAY is not set, and this test requires it";
++ } else {
++ unless (eval "use Gtk2 $REQ_GTK2_VERSION -init; 1;") {
++ plan skip_all => "This test needs Gtk2 >= $REQ_GTK2_VERSION";
++ }
++ }
+ }
+
+ if (exists $options{tests}) {
More information about the Pkg-perl-cvs-commits
mailing list