[libpoe-component-client-mpd-perl] 01/03: Add patch to make tests work with mpd >= 0.19.
gregor herrmann
gregoa at debian.org
Wed Nov 12 20:28:56 UTC 2014
This is an automated email from the git hooks/post-receive script.
gregoa pushed a commit to branch master
in repository libpoe-component-client-mpd-perl.
commit 20c03eeff6926bc1fb508f933e29cd7b73027d21
Author: gregor herrmann <gregoa at debian.org>
Date: Wed Nov 12 21:21:51 2014 +0100
Add patch to make tests work with mpd >= 0.19.
One tests checks for the accumulated playtime of the audio samples.
Test::Corpus::Audio::MPD contains 5 tracks just over 1.8 seconds each.
mpd < 0.19 rounded each track up to 2 seconds then added the lengths
in seconds to get 10s, but mpd >= 0.19 adds up the lengths in ms and then
rounds it down to 9s.
Change this test to look for >= 9 and <= 10 seconds.
Thanks: Simon McVittie for the patch.
Closes: #768712
---
debian/patches/mpd-0.19.patch | 34 ++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 35 insertions(+)
diff --git a/debian/patches/mpd-0.19.patch b/debian/patches/mpd-0.19.patch
new file mode 100644
index 0000000..ca1f732
--- /dev/null
+++ b/debian/patches/mpd-0.19.patch
@@ -0,0 +1,34 @@
+Description: Adjust test to mpd >= 0.19
+ Test::Corpus::Audio::MPD contains 5 tracks just over 1.8 seconds each.
+ mpd < 0.19 rounded each track up to 2 seconds then added the lengths
+ in seconds to get 10s, but mpd >= 0.19 adds up the lengths in ms and then
+ rounds it down to 9s.
+Origin: vendor
+Bug-Debian: https://bugs.debian.org/768712
+Author: Simon McVittie <smcv at debian.org>
+Reviewed-by: gregor herrmann <gregoa at debian.org>
+Last-Update: 2014-11-12
+Forwarded: https://rt.cpan.org/Ticket/Display.html?id=100301
+Bug: https://rt.cpan.org/Ticket/Display.html?id=100301
+
+--- a/t/42-cmds-info.t
++++ b/t/42-cmds-info.t
+@@ -20,7 +20,7 @@
+ # are we able to test module?
+ eval 'use Test::Corpus::Audio::MPD';
+ plan skip_all => $@ if $@ =~ s/\n+Compilation failed.*//s;
+-plan tests => 29;
++plan tests => 30;
+
+ # launch fake mpd
+ POE::Component::Client::MPD->spawn;
+@@ -70,7 +70,8 @@
+ is($stats->albums, 1, 'one album in the database');
+ is($stats->songs, 5, '5 songs in the database');
+ is($stats->playtime, 0, 'already played 0 seconds');
+- is($stats->db_playtime, 10, '10 seconds worth of music in the db');
++ cmp_ok($stats->db_playtime, '>=', 9, '>= 9 seconds worth of music in the db');
++ cmp_ok($stats->db_playtime, '<=', 10, '<= 10 seconds worth of music in the db');
+ isnt($stats->uptime, undef, 'uptime is defined');
+ isnt($stats->db_update, 0, 'database has been updated');
+ }
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..9e70dcb
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+mpd-0.19.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libpoe-component-client-mpd-perl.git
More information about the Pkg-perl-cvs-commits
mailing list