1 # Run all tests against CGI mode under Apache
3 # Note, to get this to run properly, you may need to give it the path to your
6 # perl t/optional_apache-cgi.pl -httpd_conf /etc/apache/httpd.conf
12 use Apache::TestRun ();
15 use File::Copy::Recursive;
24 $ENV{CATALYST_SERVER} = 'http://localhost:8529/cgi';
26 if ( !-e 't/optional_apache-cgi.pl' ) {
27 die "ERROR: Please run test from the Catalyst-Runtime directory\n";
30 push @ARGV, glob( 't/aggregate/live_*' );
32 Apache::TestRun->new->run(@ARGV);
34 # clean up if the server has shut down
35 # this allows the test files to stay around if the user ran -start-httpd
36 if ( !check_port( 'localhost', 8529 ) ) {
37 rmtree "$FindBin::Bin/../t/tmp" if -d "$FindBin::Bin/../t/tmp";
41 my ( $host, $port ) = @_;
43 my $remote = IO::Socket::INET->new(