From: | dam [...] cpan.org |
Subject: | [PATCH] 04-cmds-kill.t: restart test MPD before exiting |
In Debian we are currently applying the following patch to
POE-Component-Client-MPD.
We thought you might be interested in it too.
Description: 04-cmds-kill.t: restart test MPD before exiting
This works around the following chain of events that lead to test failure:
.
(0) At the start of 40-cmds-kill.t, a test MPD is started by
Test::Corpus::Audio::MPD
.
(1) The test MPD is stopped by the test
.
(2) an END block in T:C:A:M tries to stop the test MPD, using system('mpd
--kill')
.
(3) that system() sets $? to 256, perhaps because there is no MPD process
running
.
(4) the $? is later detected by Test2::API as a failure and the test fails
.
What this patch does is to start a test MPD between (1) and (2) so that (3)
diesn't happen.
.
Another way to fix this is perhaps to localize $? in (2) so that it does not
fiddle with the test exit code.
.
Or maybe `mpd --kill` should not exit with 256 when there is no running MPD
Author: Damyan Ivanov <dmn@debian.org>
The patch is tracked in our Git repository at
https://salsa.debian.org/perl-team/modules/packages/libpoe-component-client-mpd-perl/raw/master/debian/patches/kill-test.patch
Thanks for considering,
Damyan Ivanov,
Debian Perl Group