X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=lib%2FZOOM%2FIRSpy.pm;h=e6f2c52eb6ac82ead454618866b23b2cf770da89;hb=896e4566c5f976965a803a55488e2a50691f2552;hp=d606b6ad150bf6e9bcc1ffba18f2e24a6217f37c;hpb=01db8593a91d42a9dc554edc17d0c2c1b3858ef5;p=irspy-moved-to-github.git diff --git a/lib/ZOOM/IRSpy.pm b/lib/ZOOM/IRSpy.pm index d606b6a..e6f2c52 100644 --- a/lib/ZOOM/IRSpy.pm +++ b/lib/ZOOM/IRSpy.pm @@ -1,4 +1,4 @@ -# $Id: IRSpy.pm,v 1.45 2006-10-30 16:13:49 mike Exp $ +# $Id: IRSpy.pm,v 1.48 2006-11-03 13:11:29 mike Exp $ package ZOOM::IRSpy; @@ -20,7 +20,6 @@ use ZOOM::IRSpy::Utils; our @ISA = qw(); our $VERSION = '0.02'; -our $irspy_ns = 'http://indexdata.com/irspy/1.0'; our $irspy_to_zeerex_xsl = dirname(__FILE__) . '/../../xsl/irspy2zeerex.xsl'; @@ -30,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; @@ -343,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; } @@ -447,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; }