X-Git-Url: https://git.camperquake.de/gitweb.cgi?p=videosite.git;a=blobdiff_plain;f=videosite-test.pl;h=0d9e7718f27c0a442b891d8517000c86fe5f38bc;hp=bfea2f2622c5018899c3cef917d3393b2a7f2c14;hb=11683399d861aa6bac9b0d7bf1c754de4302fece;hpb=4937bfb6d9da16f92e2d5bd4cd983d25f417da45 diff --git a/videosite-test.pl b/videosite-test.pl index bfea2f2..0d9e771 100755 --- a/videosite-test.pl +++ b/videosite-test.pl @@ -32,11 +32,23 @@ unless(libvideosite::init()) { select(STDOUT); $| = 1; printf("Doing self tests:\n"); -foreach (libvideosite::_grabbers()) { +foreach my $g (libvideosite::_grabbers()) { my $r; - printf(" %s...", $_->{'NAME'}); - $r = $_->_selftest(); + if (@ARGV) { + my $found; + + # If there are grabber names given on the command line check + # the current name against that list and skip if not present + $found = grep { $_ eq $g->{'NAME'} } @ARGV; + + if ($found == 0) { + next; + } + } + + printf(" %s...", $g->{'NAME'}); + $r = $g->_selftest(); if(defined($r)) { if ($r == 1) { printf(" OK\n");