[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.5-230-gaaa388e

Emmanuel Lacour elacour at bestpractical.com
Mon Oct 5 06:50:47 EDT 2009


The branch, 3.8-trunk has been updated
       via  aaa388eed87cf5feddc7fbe8052f496449d906fe (commit)
       via  44bc9a8a257396c971612ae184a2491cae06a3c8 (commit)
       via  b615a2f491471407a5c96ea2478a23dd410c946d (commit)
      from  ccfe6fca61caed90f9e59b54efec3d349d680bf6 (commit)

Summary of changes:
 configure.ac                                       |    3 +-
 lib/RT/Test.pm                                     |   23 +++++++++++++++++++-
 ...+mod_perl.conf.in => apache2.2+fastcgi.conf.in} |   17 +++++++++-----
 t/data/configs/apache2.2+mod_perl.conf.in          |    1 +
 4 files changed, 36 insertions(+), 8 deletions(-)
 copy t/data/configs/{apache2.2+mod_perl.conf.in => apache2.2+fastcgi.conf.in} (57%)

- Log -----------------------------------------------------------------
commit b615a2f491471407a5c96ea2478a23dd410c946d
Author: Emmanuel Lacour <elacour at home-dn.net>
Date:   Mon Oct 5 12:43:35 2009 +0200

    Allow templates test configurations to have multiple patterns per line

diff --git a/lib/RT/Test.pm b/lib/RT/Test.pm
index 8100c27..8dbf8c6 100644
--- a/lib/RT/Test.pm
+++ b/lib/RT/Test.pm
@@ -1107,7 +1107,7 @@ sub process_in_file {
         local $/;
         <$fh>
     };
-    while ( my ($opt) = ($text =~ /\%\%(.+)\%\%/) ) {
+    while ( my ($opt) = ($text =~ /\%\%((?:(?!\%\%).)*)\%\%/) ) {
         my $value = $args{'options'}{ lc $opt };
         die "no value for $opt" unless defined $value;
 

commit 44bc9a8a257396c971612ae184a2491cae06a3c8
Author: Emmanuel Lacour <elacour at home-dn.net>
Date:   Mon Oct 5 12:46:14 2009 +0200

    Set RT_SITE_CONFIG env var for mod_perl tests so it uses the right
    configuration file and so ... the right db_name

diff --git a/lib/RT/Test.pm b/lib/RT/Test.pm
index 8dbf8c6..8312622 100644
--- a/lib/RT/Test.pm
+++ b/lib/RT/Test.pm
@@ -970,6 +970,7 @@ sub start_apache_server {
         document_root => $RT::MasonComponentRoot,
         rt_bin_path   => $RT::BinPath,
         log_file      => $log_fn,
+        rt_site_config => $ENV{'RT_SITE_CONFIG'},
     );
     {
         my $method = 'apache_'.$variant.'_server_options';
diff --git a/t/data/configs/apache2.2+mod_perl.conf.in b/t/data/configs/apache2.2+mod_perl.conf.in
index 7ccf3a8..ed12c86 100644
--- a/t/data/configs/apache2.2+mod_perl.conf.in
+++ b/t/data/configs/apache2.2+mod_perl.conf.in
@@ -24,6 +24,7 @@ LogLevel debug
 </Directory>
 
 AddDefaultCharset UTF-8
+PerlSetEnv RT_SITE_CONFIG %%RT_SITE_CONFIG%%
 PerlRequire %%RT_BIN_PATH%%/webmux.pl
 
 RedirectMatch permanent (.*)/$ $1/index.html

commit aaa388eed87cf5feddc7fbe8052f496449d906fe
Author: Emmanuel Lacour <elacour at home-dn.net>
Date:   Mon Oct 5 12:49:06 2009 +0200

    Add support for fastcgi tests

diff --git a/configure.ac b/configure.ac
index 5fc93b1..37776cd 100755
--- a/configure.ac
+++ b/configure.ac
@@ -416,6 +416,7 @@ AC_CONFIG_FILES([
                  lib/RT.pm
                  bin/mason_handler.svc
                  bin/webmux.pl
-                 t/data/configs/apache2.2+mod_perl.conf],
+                 t/data/configs/apache2.2+mod_perl.conf
+                 t/data/configs/apache2.2+fastcgi.conf],
                )
 AC_OUTPUT
diff --git a/lib/RT/Test.pm b/lib/RT/Test.pm
index 8312622..b0a9b3f 100644
--- a/lib/RT/Test.pm
+++ b/lib/RT/Test.pm
@@ -1052,6 +1052,26 @@ sub apache_mod_perl_server_options {
     return;
 }
 
+sub apache_fastcgi_server_options {
+    my $self = shift;
+    my %info = %{ shift() };
+    my $current = shift;
+
+    my %required_modules = (
+        '2.2' => [qw(authz_host log_config env alias mime fastcgi)],
+    );
+    my @mlist = @{ $required_modules{ $info{'version'} } };
+
+    $current->{'load_modules'} = '';
+    foreach my $mod ( @mlist ) {
+        next if grep "$mod.c" eq $_, @{ $info{'modules'} };
+
+        $current->{'load_modules'} .=
+            "LoadModule ${mod}_module modules/mod_${mod}.so\n";
+    }
+    return;
+}
+
 sub find_apache_server {
     my $self = shift;
     return $_ foreach grep defined,
diff --git a/t/data/configs/apache2.2+fastcgi.conf.in b/t/data/configs/apache2.2+fastcgi.conf.in
new file mode 100644
index 0000000..c0c01d1
--- /dev/null
+++ b/t/data/configs/apache2.2+fastcgi.conf.in
@@ -0,0 +1,44 @@
+ServerRoot %%SERVER_ROOT%%
+PidFile %%PID_FILE%%
+ServerAdmin root at localhost
+
+%%LOAD_MODULES%%
+
+TypesConfig /etc/mime.types
+FastCgiIpcDir /tmp
+
+<IfModule !mpm_netware_module>
+<IfModule !mpm_winnt_module>
+User @WEB_USER@
+Group @WEB_GROUP@
+</IfModule>
+</IfModule>
+
+Listen %%LISTEN%%
+
+ErrorLog "%%LOG_FILE%%"
+LogLevel debug
+
+<Directory />
+    Options FollowSymLinks
+    AllowOverride None
+    Order deny,allow
+    Deny from all
+</Directory>
+
+AddDefaultCharset UTF-8
+
+FastCgiServer %%RT_BIN_PATH%%/mason_handler.fcgi -processes 1 -idle-timeout 180 -initial-env RT_SITE_CONFIG=%%RT_SITE_CONFIG%%
+
+Alias /NoAuth/images/ %%DOCUMENT_ROOT%%/NoAuth/images/
+ScriptAlias / %%RT_BIN_PATH%%/mason_handler.fcgi/
+
+DocumentRoot "%%DOCUMENT_ROOT%%"
+<Location />
+    Order allow,deny
+    Allow from all
+
+    Options +ExecCGI
+    AddHandler fastcgi-script fcgi
+</Location>
+

-----------------------------------------------------------------------


More information about the Rt-commit mailing list