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