5 $YAZ_LOG => "irspy,irspy_test"
8 my @rulesFiles = ("dallas.rules");
10 my $allTargets = (@id == 1 && $id[0] eq "");
11 if ($allTargets && !$really) {
15 Testing all the targets is a very slow process.
16 Are you sure you want to do this?
19 <a href="?really=1&test=Quick">Yes: Quick Test</a><br/>
20 <a href="?really=1&test=Main">Yes: Full Test</a><br/>
21 <a href="/">No</a><br/>
26 print "<h2>Testing ...</h2>\n";
27 print " <ul>\n", join("", map { " <li>$_</li>\n" } @id), "</ul>\n"
29 print "<p>Logging: <tt>", join("/", split /,/, $YAZ_LOG), "</tt></p>\n";
32 # Turning on autoflush with $m->autoflush() doesn't seem to work if
33 # even if the "MasonEnableAutoflush" configuration parameter is turned
34 # on in the HTTP configuration, so we don't even try -- instead,
35 # having ZOOM::IRSpy::Web::log() explicitly calling $m->flush_buffer()
37 $ZOOM::IRSpy::xslt_max_depth = 3500; ### Hideous hack
38 my $db = ZOOM::IRSpy::connect_to_registry();
39 my $spy = new ZOOM::IRSpy::Web($db,
41 $spy->log_init_level($YAZ_LOG);
42 $spy->targets(@id) if !$allTargets;
43 foreach my $rulesFile (@rulesFiles) {
44 $spy->apply_rules($ENV{DOCUMENT_ROOT} . "/../../etc/" . $rulesFile);
45 print "applied rules '$rulesFile'\n";
47 $spy->initialise($test);
48 my $res = $spy->check();
51 print "<b>All tests were attempted</b>\n";
53 print "<b>$res tests were skipped</b>\n";