From: Mike Taylor Date: Thu, 30 Sep 2010 13:18:01 +0000 (+0100) Subject: Web-based tests now apply configured rule-sets before running. At X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=commitdiff_plain;h=c7af39939f5ba5f87fd8f20b6797e0386209654c Web-based tests now apply configured rule-sets before running. At present there is only one rule-set. --- diff --git a/web/htdocs/details/check.mc b/web/htdocs/details/check.mc index bc99268..a7485ba 100644 --- a/web/htdocs/details/check.mc +++ b/web/htdocs/details/check.mc @@ -5,6 +5,8 @@ $really => 0 $YAZ_LOG => "irspy,irspy_test" <%perl> +my @rulesFiles = ("dallas.rules"); + my $allTargets = (@id == 1 && $id[0] eq ""); if ($allTargets && !$really) { @@ -37,6 +39,10 @@ my $spy = new ZOOM::IRSpy::Web($db, admin => "fruitbat"); $spy->log_init_level($YAZ_LOG); $spy->targets(@id) if !$allTargets; +foreach my $rulesFile (@rulesFiles) { + $spy->apply_rules($ENV{DOCUMENT_ROOT} . "/../../etc/" . $rulesFile); + print "applied rules '$rulesFile'\n"; +} $spy->initialise($test); my $res = $spy->check(); print "

\n";