Commit | Line | Data |
58f5682a |
1 | #!perl |
2 | |
3 | # Run all tests against CGI mode under Apache |
4 | # |
5 | # Note, to get this to run properly, you may need to give it the path to your |
6 | # httpd.conf: |
7 | # |
8 | # perl t/optional/apache-cgi.pl -httpd_conf /etc/apache/httpd.conf |
9 | |
10 | use strict; |
11 | use warnings; |
12 | |
13 | use Apache::Test; |
14 | use Apache::TestRun (); |
15 | |
16 | use File::Path; |
17 | use File::Copy::Recursive; |
18 | use FindBin; |
19 | |
20 | # clean up |
21 | rmtree "$FindBin::Bin/../../t/var" if -d "$FindBin::Bin/../../t/var"; |
22 | |
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' ); |
29 | |
30 | # remove TestApp's tests so Apache::Test doesn't try to run them |
31 | rmtree 't/var/TestApp/t'; |
32 | |
dd3af04e |
33 | $ENV{CATALYST_SERVER} = 'http://localhost:8529/cgi'; |
58f5682a |
34 | |
35 | Apache::TestRun->new->run(@ARGV); |
36 | |
37 | # clean up |
38 | rmtree "$FindBin::Bin/../../t/var" if -d "$FindBin::Bin/../../t/var"; |