3 # Run all tests against FastCGI mode under Apache
5 # Note, to get this to run properly, you may need to give it the path to your
8 # perl t/optional/apache-fastcgi.pl -httpd_conf /etc/apache/httpd.conf
14 use Apache::TestRun ();
17 use File::Copy::Recursive;
21 rmtree "$FindBin::Bin/../../t/var" if -d "$FindBin::Bin/../../t/var";
23 # create a TestApp and copy the test libs into it
24 mkdir "$FindBin::Bin/../../t/var";
25 chdir "$FindBin::Bin/../../t/var";
26 system "$FindBin::Bin/../../script/catalyst.pl TestApp";
27 chdir "$FindBin::Bin/../..";
28 File::Copy::Recursive::dircopy( 't/live/lib', 't/var/TestApp/lib' );
30 # remove TestApp's tests so Apache::Test doesn't try to run them
31 rmtree 't/var/TestApp/t';
33 $ENV{CATALYST_SERVER} = 'http://localhost:8529/fastcgi';
35 Apache::TestRun->new->run(@ARGV);
38 rmtree "$FindBin::Bin/../../t/var" if -d "$FindBin::Bin/../../t/var";