httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <joe+gm...@sunstarsys.com>
Subject [apreq-2] passing arguments to apxs via Apache::Test
Date Mon, 19 May 2003 03:17:21 GMT

I'd like to use Apache::Test* for testing the 
apreq-2 filter independently of the perl glue,
and am planning to put such tests into env/t. 

The first problem I keep running into is that
I don't know how to get Apache::Test to pass
arguments (like -I, -L -l, etc) to apxs before
it compiles my c-modules in env/c-modules.
These arguments are really a necessity in order
to link the c-modules against the (uninstalled)
apreq-2 library, which is built in src/.libs.

I doubt what follows is the recommended approach, but
the workaround I came up with was to do something like

  % perl Makefile.PL -apxs '"path/to/apxs -I../../src ..."'

which works if Apache/TestMM.pm and Apache/TestRun.pm
are patched as below.  Does anyone have of a better way
to do this?  Maybe I should just write a custom Makefile for
the env/c-modules directory?

Anyways, here's the patch for httpd-test:

Index: Apache-Test/lib/Apache/TestMM.pm
===================================================================
RCS file: /home/cvspublic/httpd-test/perl-framework/Apache-Test/lib/Apache/TestMM.pm,v
retrieving revision 1.27
diff -u -r1.27 TestMM.pm
--- Apache-Test/lib/Apache/TestMM.pm    14 May 2003 22:57:40 -0000      1.27
+++ Apache-Test/lib/Apache/TestMM.pm    19 May 2003 02:54:05 -0000
@@ -77,7 +77,9 @@
     $body .= Apache::TestConfig->modperl_2_inc_fixup;

     if (@Apache::TestMM::Argv) {
-        $body .= "\n\%Apache::TestConfig::Argv = qw(@Apache::TestMM::Argv);\n";
+        local $" = '","';
+        $body .= qq{\n\%Apache::TestConfig::Argv = ("@Apache::TestMM::Argv");\n};
     }

     my $in = Symbol::gensym();
Index: Apache-Test/lib/Apache/TestRun.pm
===================================================================
RCS file: /home/cvspublic/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm,v
retrieving revision 1.110
diff -u -r1.110 TestRun.pm
--- Apache-Test/lib/Apache/TestRun.pm   14 May 2003 02:53:54 -0000      1.110
+++ Apache-Test/lib/Apache/TestRun.pm   19 May 2003 02:54:06 -0000
@@ -846,7 +846,8 @@
     $body .= Apache::TestConfig->modperl_2_inc_fixup;

     if (@Apache::TestMM::Argv) {
-        $body .= "\n\%Apache::TestConfig::Argv = qw(@Apache::TestMM::Argv);\n";
+        local $" = '","';
+        $body .= qq{\n\%Apache::TestConfig::Argv = ("@Apache::TestMM::Argv");\n};
     }

     my $header = Apache::TestConfig->perlscript_header;


-- 
Joe Schaefer


Mime
View raw message