Towards generic table.
[irspy-moved-to-github.git] / web / htdocs / details / check.mc
1 %# $Id: check.mc,v 1.10 2006-10-25 09:54:16 mike Exp $
2 <%args>
3 @id
4 $test => "Quick"
5 </%args>
6 <%perl>
7 my $allTargets = (@id == 1 && $id[0] eq "");
8 print "<h2>Testing ...</h2>\n";
9 print "     <ul>\n", join("", map { "      <li>$_\n" } @id), "</ul>\n"
10     if !$allTargets;
11 $m->flush_buffer();
12
13 # Turning on autoflush with $m->autoflush() doesn't seem to work if
14 # even if the "MasonEnableAutoflush" configuration parameter is turned
15 # on in the HTTP configuration, so we donb't even try -- instead,
16 # having ZOOM::IRSpy::Web::log() explicitly calling $m->flush_buffer()
17
18 my $spy = new ZOOM::IRSpy::Web("localhost:3313/IR-Explain---1",
19                                admin => "fruitbat");
20 $spy->log_init_level("irspy,irspy_test");
21 $spy->targets(@id) if !$allTargets;
22 $spy->initialise();
23 my $res = $spy->check($test);
24 print "<p>\n";
25 if ($res == 0) {
26     print "<b>All tests were run</b>\n";
27 } else {
28     print "<b>$res tests were skipped</b>\n";
29 }
30 print "</p>\n";
31 </%perl>