Skip Menu |

This queue is for tickets about the GStreamer-Interfaces CPAN distribution.

Report information
The Basics
Id: 43715
Status: stalled
Priority: 0/
Queue: GStreamer-Interfaces

People
Owner: XAOC [...] cpan.org
Requestors: antonio [...] dyne.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.04
Fixed in: (no value)



Subject: some tests of t/GstPropertyProbe.t if /dev/alsamixer is not accessible
Hi, the bug is pretty much what the subject says. In Debian we build packages in a chroot and /dev/alsamixer is not accessible. The attached patch fixes the problem. Cheers Antonio
Subject: skip_alsamixer_tests.patch
/dev/alsamixer is not accessible from {cow,p}builder Index: libgstreamer-interfaces-perl/t/GstPropertyProbe.t =================================================================== --- libgstreamer-interfaces-perl.orig/t/GstPropertyProbe.t 2009-02-27 22:02:59.000000000 +0000 +++ libgstreamer-interfaces-perl/t/GstPropertyProbe.t 2009-02-27 22:04:13.000000000 +0000 @@ -1,7 +1,7 @@ #!/usr/bin/perl use strict; use warnings; -use Test::More tests => 9; +use Test::More qw(no_plan); # $Id: GstPropertyProbe.t,v 1.3 2006/07/07 22:02:22 kaffeetisch Exp $ @@ -9,6 +9,16 @@ use GStreamer -init; use GStreamer::Interfaces; +# if there is no r/w access to /dev/alsamixer we need to skip some tests +my $alsamixer_rwaccess; +if ( open (FD, '+<', "/dev/alsamixer") ) { + $alsamixer_rwaccess = 1; + close (FD); +} else { + $alsamixer_rwaccess = 0; +} + +# the actual tests my $plugin = "alsamixer"; my $property = "device"; @@ -24,11 +34,15 @@ is($element -> needs_probe($pspec), TRUE); $element -> probe_property($pspec); -ok($element -> get_probe_values($pspec)); -ok($element -> probe_and_get_probe_values($pspec)); +if ( $alsamixer_rwaccess ) { + ok($element -> get_probe_values($pspec)); + ok($element -> probe_and_get_probe_values($pspec)); +} ok(defined $element -> needs_probe_name($property)); $element -> probe_property_name($property); -ok($element -> get_probe_values_name($property)); -ok($element -> probe_and_get_probe_values_name($property)); +if ( $alsamixer_rwaccess ) { + ok($element -> get_probe_values_name($property)); + ok($element -> probe_and_get_probe_values_name($property)); +}
Subject: Re: [rt.cpan.org #43715] some tests of t/GstPropertyProbe.t if /dev/alsamixer is not accessible
Date: Sun, 01 Mar 2009 13:03:40 +0100
To: bug-GStreamer-Interfaces [...] rt.cpan.org
From: Torsten Schoenfeld <kaffeetisch [...] gmx.de>
Antonio Radici via RT wrote: Show quoted text
> the bug is pretty much what the subject says. In Debian we build > packages in a chroot and /dev/alsamixer is not accessible.
What failure exactly do you get? My Ubuntu box doesn't have /dev/alsamixer at all, and yet all the tests pass. So the presence of /dev/alsamixer is not a good criterion. Show quoted text
> The attached patch fixes the problem.
Here's the same patch adjusted to use SKIP blocks instead of no_plan.
Index: GstPropertyProbe.t =================================================================== --- GstPropertyProbe.t (revision 20) +++ GstPropertyProbe.t (working copy) @@ -9,6 +9,14 @@ use Glib qw(TRUE FALSE); use GStreamer -init; use GStreamer::Interfaces; +# if there is no r/w access to /dev/alsamixer, we need to skip some tests +my $alsamixer_rwaccess = 0; +if ( open (FD, '+<', "/dev/alsamixer") ) { + $alsamixer_rwaccess = 1; + close (FD); +} + +# the actual tests my $plugin = "alsamixer"; my $property = "device"; @@ -24,11 +32,19 @@ isa_ok($pspec, "Glib::ParamSpec"); is($element -> needs_probe($pspec), TRUE); $element -> probe_property($pspec); -ok($element -> get_probe_values($pspec)); -ok($element -> probe_and_get_probe_values($pspec)); +SKIP: { + skip 'no r/w access to /dev/alsamixer', 2 + unless $alsamixer_rwaccess; + ok($element -> get_probe_values($pspec)); + ok($element -> probe_and_get_probe_values($pspec)); +} ok(defined $element -> needs_probe_name($property)); $element -> probe_property_name($property); -ok($element -> get_probe_values_name($property)); -ok($element -> probe_and_get_probe_values_name($property)); +SKIP: { + skip 'no r/w access to /dev/alsamixer', 2 + unless $alsamixer_rwaccess; + ok($element -> get_probe_values_name($property)); + ok($element -> probe_and_get_probe_values_name($property)); +}
Is this still a problem? We plan on deprecating GStreamer::Interfaces in December of 2020 [1][2][3]. On my Debian Stretch (7.11) box that I'm using for building deprecation releases, I don't have a '/dev/alsamixer', all of my ALSA dev files are under '/dev/snd' (but still no 'alsamixer'). Thanks! [1] Deprecation announcement: https://tinyurl.com/y4u6b33f [2] Full list of deprecated modules and their replacements: https://tinyurl.com/yxhmmu49 [3] First "deprecation patch" email: https://tinyurl.com/yy7zq2d5