sbekman 01/06/21 00:41:14 Modified: Apache-Test/lib/Apache TestRun.pm Log: try out Apache::TestTrace Revision Changes Path 1.6 +12 -11 modperl-2.0/Apache-Test/lib/Apache/TestRun.pm Index: TestRun.pm =================================================================== RCS file: /home/cvs/modperl-2.0/Apache-Test/lib/Apache/TestRun.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- TestRun.pm 2001/06/17 15:26:46 1.5 +++ TestRun.pm 2001/06/21 07:41:13 1.6 @@ -6,6 +6,7 @@ use Apache::TestConfig (); use Apache::TestRequest (); use Apache::TestHarness (); +use Apache::TestTrace; use File::Spec::Functions qw(catfile); use Getopt::Long qw(GetOptions); @@ -179,10 +180,10 @@ $SIG{INT} = sub { if ($caught_sig_int++) { - print "\ncaught SIGINT\n"; + warning "\ncaught SIGINT\n"; exit; } - print "\nhalting tests\n"; + notice "\nhalting tests\n"; $server->stop if $opts->{'start-httpd'}; exit; }; @@ -232,10 +233,10 @@ my $test_config = $self->{test_config}; unless ($test_config->{vars}->{httpd}) { - print "no test server configured, please specify an httpd or "; - print $test_config->{MP_APXS} ? - "an apxs other than $test_config->{MP_APXS}" : "apxs"; - print "\nor put either in your PATH\n"; + error "no test server configured, please specify an httpd or ", + ($test_config->{MP_APXS} ? + "an apxs other than $test_config->{MP_APXS}" : "apxs"), + "or put either in your PATH"; exit 1; } @@ -243,7 +244,7 @@ exit 1 unless $self->{server}->start; } elsif ($self->{opts}->{'run-tests'} and !$self->{server}->ping) { # make sure that the server is up when -run-tests is used - print "the test server wasn't not running: starting it...\n"; + warning "the test server wasn't not running: starting it..."; exit 1 unless $self->{server}->start; } } @@ -345,17 +346,17 @@ if ($pid) { if ($pid == -1) { - print "port $test_config->{vars}->{port} is in use, ", - "but cannot determine server pid\n"; + error "port $test_config->{vars}->{port} is in use, ". + "but cannot determine server pid"; } else { my $version = $server->{version}; - print "server $name running (pid=$pid, version=$version)\n"; + notice "server $name running (pid=$pid, version=$version)\n"; } return; } - print "no server is running on $name\n"; + warning "no server is running on $name\n"; } sub opt_debug {