Provide authentication tokens.
[irspy-moved-to-github.git] / web / htdocs / details / check.mc
1 %# $Id: check.mc,v 1.3 2006-09-20 16:36:07 mike Exp $
2 <%perl>
3 my $id = $r->param("id");
4 if (!$id) {
5     print "No 'id' specified!\n";
6 } else {
7     print "<h2>$id</h2>\n";
8     my $spy = new ZOOM::IRSpy("localhost:3313/IR-Explain---1", admin => "fruitbat");
9     ZOOM::Log::mask_str("irspy,irspy_test"); # Do we need this?
10     ZOOM::Log::init_level(ZOOM::Log::module_level("irspy,irspy_test"));
11     ZOOM::Log::time_format("%F %T"); # ISO-8601 format
12     ### capture logging output ... somehow.
13     $spy->targets($id);
14     $spy->initialise();
15     my $res = $spy->check();
16     if ($res == 0) {
17         print "All tests were run\n";
18     } else {
19         print "Some tests were skipped\n";
20     }
21 }
22 </%perl>