components/apache2-modules/mod_security2/patches/tests.patch
changeset 1212 207ff3b0329a
equal deleted inserted replaced
1211:72f88619e71d 1212:207ff3b0329a
       
     1 Allows to run test suite when it's configured and build outside of
       
     2 source directory.
       
     3 
       
     4 --- modsecurity-apache_2.7.2/tests/run-unit-tests.pl.in	Tue Jan 22 18:47:08 2013
       
     5 +++ modsecurity-apache_2.7.2/tests/run-unit-tests.pl.in	Wed Mar 13 08:23:44 2013
       
     6 @@ -16,7 +16,7 @@
       
     7  my @TYPES = qw(tfn op action);
       
     8  my $TEST = "./msc_test";
       
     9  my $SCRIPT = basename($0);
       
    10 -my $SCRIPTDIR = dirname($0);
       
    11 +my $SCRIPTDIR = "@srcdir@";
       
    12  my $PASSED = 0;
       
    13  my $TOTAL = 0;
       
    14  my $DEBUG = $ENV{MSC_TEST_DEBUG} || 0;
       
    15 @@ -85,7 +85,10 @@
       
    16              $param = escape($t{output});
       
    17          }
       
    18          elsif ($t{type} eq "op") {
       
    19 -            $param = escape($t{param});
       
    20 +            $param = escape($t{param}); 
       
    21 +            if ($t{name} eq "pmFromFile") {
       
    22 +                $param = "$SCRIPTDIR/$param";
       
    23 +            }
       
    24          }
       
    25          elsif ($t{type} eq "action") {
       
    26              $param = escape($t{param});