commit 7909d53cce0df9429598cb1b709392d671a87bcd Author: Petr Písař <ppisar@xxxxxxxxxx> Date: Wed Aug 20 15:48:52 2014 +0200 Enable X11 tests perl-Gtk2-Notify.spec | 23 ++++++++++++++++++++++- 1 files changed, 22 insertions(+), 1 deletions(-) --- diff --git a/perl-Gtk2-Notify.spec b/perl-Gtk2-Notify.spec index 47c97f4..0fd77fb 100644 --- a/perl-Gtk2-Notify.spec +++ b/perl-Gtk2-Notify.spec @@ -1,3 +1,5 @@ +%global use_x11_tests 1 + Name: perl-Gtk2-Notify Version: 0.05 Release: 22%{?dist} @@ -32,6 +34,20 @@ BuildRequires: perl(Test::Exception) BuildRequires: perl(Test::More) # Optional tests: BuildRequires: perl(Test::Pod) >= 1.14 +%if %{use_x11_tests} +# X11 tests: +# Some tests invoke glib functions which try dbus-launch. Without +# dbus-launch, an warning is emmitted which causes Test::Exception to raise an +# error. +BuildRequires: dbus-x11 +# And the dbus is used to talk to org.freedesktop.Notifications server which +# can be requested by desktop-notification-daemon RPM symbol. However it can +# pull whole Gnome or KDE. So we use mimalistic `dunst' instead. +BuildRequires: dunst +BuildRequires: font(:lang=en) +BuildRequires: xorg-x11-server-Xvfb +BuildRequires: xorg-x11-xinit +%endif Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Requires: perl(Carp) @@ -58,7 +74,11 @@ find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; %check # tests mostly bomb under mock, unfortunately -%{?_with_display_tests: DISPLAY=:0 make test} +%if %{use_x11_tests} +xvfb-run -a make test +%else +make test +%endif %files %doc Changes examples README @@ -69,6 +89,7 @@ find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; %changelog * Wed Aug 20 2014 Petr Pisar <ppisar@xxxxxxxxxx> - 0.05-22 - Modernize spec file +- Enable X11 tests * Sun Aug 17 2014 Fedora Release Engineering <rel-eng@xxxxxxxxxxxxxxxxxxxxxxx> - 0.05-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel