3 # $Id: irspy.pl,v 1.6 2006-09-22 15:23:51 mike Exp $
6 # YAZ_LOG=irspy,irspy_test,irspy_debug perl -I ../lib irspy.pl -t "bagel.indexdata.dk/gils z3950.loc.gov:7090/Voyager" localhost:3313/IR-Explain---1
14 if (!getopts('t:a', \%opts) || @ARGV != 1) {
15 print STDERR qq[Usage: $0 [options] <IRSpy-database>
16 -t <t1 t2 ...> Space-separated list of targets to check
17 -a Check all targets registered in database
22 my $dbname = $ARGV[0];
23 my $targetList = $opts{t};
24 if (!defined $targetList && !$opts{a}) {
25 print STDERR "$0: neither -t nor -a specified\n";
29 my $spy = new ZOOM::IRSpy($dbname, "admin", "fruitbat");
30 $spy->targets(grep { $_ ne "" } split /\s+/, $targetList)
31 if defined $targetList;
33 my $res = $spy->check();
35 print "All tests were run\n";
37 print "Some tests were skipped\n";