X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=lib%2FZOOM%2FIRSpy.pm;h=e6f2c52eb6ac82ead454618866b23b2cf770da89;hb=5068b2b9f395c1c4c38b01c1961742439c89bf0b;hp=877f9f49caa24f86a4d9546fd55d7a2b21119600;hpb=0997b94b7fe2fb1982c958409df33ecee233e8cf;p=irspy-moved-to-github.git diff --git a/lib/ZOOM/IRSpy.pm b/lib/ZOOM/IRSpy.pm index 877f9f4..e6f2c52 100644 --- a/lib/ZOOM/IRSpy.pm +++ b/lib/ZOOM/IRSpy.pm @@ -1,4 +1,4 @@ -# $Id: IRSpy.pm,v 1.46 2006-11-01 10:14:09 mike Exp $ +# $Id: IRSpy.pm,v 1.48 2006-11-03 13:11:29 mike Exp $ package ZOOM::IRSpy; @@ -29,6 +29,7 @@ sub OK { 29 } # No problems, task is still progressing sub TASK_DONE { 18 } # Task is complete, next task should begin sub TEST_GOOD { 8 } # Whole test is complete, and succeeded sub TEST_BAD { 31 } # Whole test is complete, and failed +sub TEST_SKIPPED { 12 } # Test couldn't be run package ZOOM::IRSpy; @@ -342,6 +343,7 @@ sub check { $conn->log("irspy", "has no more tests: removing"); splice @conn, $i0, 1; $this->_rewrite_record($conn); + $conn->option(rewrote_record => 1); next; } @@ -446,12 +448,40 @@ sub check { $nskipped += $n; } } + + } elsif ($res == ZOOM::IRSpy::Status::TEST_SKIPPED) { + $conn->log("irspy_task", "test skipped during task $task"); + $conn->current_task(0); + $conn->next_task(0); + # I think that's all we need to do + } else { die "unknown callback return-value '$res'"; } } $this->log("irspy", "exiting main loop"); + # Sanity checks: none of the following should ever happen + foreach my $conn (@{ $this->{connections} }) { + my $test = $conn->option("current_test_address"); + my $next = $this->_next_test($test); + if (defined $next) { + warn "$conn (in test '$test') has queued test '$next'"; + } + if (my $task = $conn->current_task()) { + warn "$conn still has an active task $task"; + } + if (my $task = $conn->next_task()) { + warn "$conn still has a queued task $task"; + } + if (!$conn->is_idle()) { + warn "$conn is not idle (still has ZOOM-C level tasks queued)"; + } + if (!$conn->option("rewrote_record")) { + warn "$conn did not rewrite its ZeeRex record"; + } + } + return $nskipped; }