From: Chris Nehren Date: Fri, 15 Apr 2011 04:27:37 +0000 (-0400) Subject: fix signal sent to stop app server. fix starting and stopping of selenium/xvnc server... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8ecad210caef564cba0dc0dabab23becb688f078;p=scpubgit%2FTest-Harness-Selenium.git fix signal sent to stop app server. fix starting and stopping of selenium/xvnc servers and schedule appropriately around testing directories. Stop the app server in DESTROY. --- diff --git a/lib/Test/Harness/Selenium.pm b/lib/Test/Harness/Selenium.pm index 39721f7..e0097e8 100644 --- a/lib/Test/Harness/Selenium.pm +++ b/lib/Test/Harness/Selenium.pm @@ -101,16 +101,17 @@ sub start_app_server { sub stop_app_server { my($self) = @_; - $self->{app_server_proc}->complete || $self->{app_server_proc}->kill(9); + $self->{app_server_proc}->complete || $self->{app_server_proc}->kill("KILL"); } sub test_directory { my ($self, $dir) = @_; + if($self->{selenium_rc}{start} && !$self->{selenium_rc}{selenium_server_proc}) { + $self->start_selenium_server; + } my @tests = File::Find::Rule->file()->name('*.html')->in($dir); for my $test (@tests) { - $self->start_server; $self->run_tests_for($test); - $self->stop_server; } } @@ -141,6 +142,7 @@ sub DESTROY { $self->{selenium_rc}{selenium_server_proc}->complete || $self->{selenium_rc}{selenium_server_proc}->kill("KILL"); } + $self->stop_app_server; } 1;