From bf563d29e40e6bb6cb9732b4457e633468a8c6c2 Mon Sep 17 00:00:00 2001 From: Tom Feist Date: Sat, 26 Feb 2011 00:37:11 +0000 Subject: lots of work moving things around so it mostly works. Hooray --- testing/lib/Test/Irssi/Driver.pm | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'testing/lib/Test/Irssi/Driver.pm') diff --git a/testing/lib/Test/Irssi/Driver.pm b/testing/lib/Test/Irssi/Driver.pm index 9d39d44..7a20d91 100644 --- a/testing/lib/Test/Irssi/Driver.pm +++ b/testing/lib/Test/Irssi/Driver.pm @@ -130,9 +130,11 @@ sub setup { { _start => 'START', _stop => 'STOP', + got_sigchld => 'CHILD', + got_terminal_stdin => 'terminal_stdin', got_child_stdout => 'child_stdout', - got_sigchld => 'CHILD', + got_delay => 'timer_expired', create_delay => 'timer_created', testing_ready => 'start_tests', @@ -148,16 +150,21 @@ sub setup { sub start_tests { my ($self) = $_[OBJECT]; - $self->parent->api->run_test('test1'); + $self->log("Starting to run tests"); + $self->log("-" x 80); + $self->parent->run_tests(); } sub timer_created { - my ($heap, $kernel, $duration) = @_[HEAP, KERNEL, ARG0]; - $kernel->delay(got_delay => $duration, 0); + my ($self, $heap, $kernel, $duration) = @_[OBJECT, HEAP, KERNEL, ARG0]; + $kernel->delay(got_delay => $duration); + $self->log("Timer created"); } sub timer_expired { - die "Timer Expired"; + my ($self, $data) = @_[OBJECT,ARG0]; + $self->log("Timeout invoking test again."); + $self->parent->active_test->resume_from_timer; } sub save_term_settings { -- cgit v1.2.3