1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
Description: skip tests that need a CDROM drive to enable building in a chroot
Origin: vendor
Forwarded: no
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2012-06-16
--- a/t/05.ops.t
+++ b/t/05.ops.t
@@ -14,6 +14,9 @@
use Test::More tests => 6;
note 'Test running miscellaneous operations';
+SKIP: {
+skip "No device '/dev/cdrom' found", 6 unless -e "/dev/cdrom";
+
my @drives = Device::Cdio::get_devices();
ok ( 1 , 'Device::Cdio::get_devices');
@drives = Device::Cdio::get_devices_with_cap($perlcdio::FS_MATCH_ALL);
@@ -26,3 +29,5 @@
ok ( 1 , 'Device::Cdio::Device::have_ATAPI');
$dev->get_media_changed();
ok ( 1 , 'Device::Cdio::Device::get_media_changed');
+
+}
--- a/t/11.dev.t
+++ b/t/11.dev.t
@@ -16,6 +16,8 @@
#should be imported from Build.PL or ...
my $device = '/dev/cdrom';
+plan skip_all => "No device '$device' found" unless -e $device;
+
note 'Test running audio device operations';
my $dev = Device::Cdio::Device->new(-driver_id=>$perlcdio::DRIVER_DEVICE);
|