Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Now we can test before 'make install'

  • Loading branch information...
commit c5d70ca013cad125b276f1c87f685bf2431362ee 1 parent 4097f28
@spiritloose authored
Showing with 5 additions and 9 deletions.
  1. +1 −1  Makefile.in
  2. +4 −8 t/TestModPSGI.pm
View
2  Makefile.in
@@ -39,7 +39,7 @@ mod_psgi.c: ppport.h
ppport.h:
$(PERL) -MDevel::PPPort -e 'Devel::PPPort::WriteFile'
-test:
+test: .libs/mod_psgi.so
prove $(TESTS)
reload: install restart
View
12 t/TestModPSGI.pm
@@ -4,22 +4,17 @@ use warnings;
use Test::Base -Base;
use t::Config;
-use File::Basename;
use URI::Escape;
use List::Util qw(sum);
use Test::TCP;
use File::Temp;
+use Cwd;
our @EXPORT = qw(
running_in_mod_psgi eval_body_app eval_response_app
run_server_tests
);
-BEGIN {
- no warnings 'redefine';
- *Test::Base::run_compare = sub {}; # XXX
-}
-
sub running_in_mod_psgi() {
exists $ENV{MOD_PSGI};
}
@@ -103,14 +98,15 @@ our $TestFile;
sub run_httpd($) {
my $port = shift;
- my $tmpdir = $ENV{APACHE2_TMP_DIR} || File::Temp::tempdir(CLEANUP => 1);
+ my $tmpdir = $ENV{MOD_PSGI_TMP_DIR} || File::Temp::tempdir(CLEANUP => 1);
my $apxs = $t::Config::APXS;
chomp(my $libexecdir = `$apxs -q libexecdir`);
chomp(my $sbindir = `$apxs -q sbindir`);
chomp(my $progname = `$apxs -q progname`);
my $httpd = "$sbindir/$progname";
+ my $cwd = getcwd;
my $conf = <<"END_CONF";
-LoadModule psgi_module $libexecdir/mod_psgi.so
+LoadModule psgi_module $cwd/.libs/mod_psgi.so
PidFile $tmpdir/httpd.pid
LockFile $tmpdir/httpd.lock
ErrorLog $tmpdir/error_log
Please sign in to comment.
Something went wrong with that request. Please try again.