From c7af39939f5ba5f87fd8f20b6797e0386209654c Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Thu, 30 Sep 2010 14:18:01 +0100 Subject: [PATCH] Web-based tests now apply configured rule-sets before running. At present there is only one rule-set. --- web/htdocs/details/check.mc | 6 ++++++ 1 file changed, 6 insertions(+) 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"; -- 1.7.10.4