11 $SIG{ __DIE__ } = sub { Carp::confess( @_ ) };
18 GetOptions("d" => \$debug);
20 push(@INC, dirname(realpath($0)));
23 unless(libvideosite::register_api({
24 _debug => sub { return $debug },
26 die("Error registering API: $libvideosite::error");
29 unless(libvideosite::init()) {
30 die("Could not init libvideosite: $libvideosite::error");
35 printf("Doing self tests:\n");
36 foreach my $g (libvideosite::_grabbers()) {
42 # If there are grabber names given on the command line check
43 # the current name against that list and skip if not present
44 $found = grep { $_ eq $g->{'NAME'} } @ARGV;
51 printf(" %s...", $g->{'NAME'});
58 printf(" no self test\n");
66 printf("\n\n%d succeeded\n%d failed\n%d not testable\n", $success, $fail, $notest);