[Rt-commit] r5527 - in Test-Chimps/trunk: .

zev at bestpractical.com zev at bestpractical.com
Tue Jul 4 17:17:25 EDT 2006


Author: zev
Date: Tue Jul  4 17:17:25 2006
New Revision: 5527

Modified:
   Test-Chimps/trunk/   (props changed)
   Test-Chimps/trunk/lib/Test/Chimps/Client/Poller.pm

Log:
 r9843 at galvatron:  zev | 2006-07-04 17:17:16 -0400
 * forgot to cancel alarm
 * localize assignment to $SIG{ALRM}


Modified: Test-Chimps/trunk/lib/Test/Chimps/Client/Poller.pm
==============================================================================
--- Test-Chimps/trunk/lib/Test/Chimps/Client/Poller.pm	(original)
+++ Test-Chimps/trunk/lib/Test/Chimps/Client/Poller.pm	Tue Jul  4 17:17:25 2006
@@ -149,16 +149,19 @@
 
         $self->_checkout_project($config->{$project}, $revision);
 
-        local $SIG{ALRM} = sub { die "10 minute timeout exceeded" };
-        alarm 600;
-        print "running tests for $project\n";
-        my $start_time = time;
-        my $model;
-        eval {
-          $model = Test::TAP::Model::Visual->new_with_tests(glob("t/*.t t/*/t/*.t"));
-        };
-        my $duration = time - $start_time;
-
+        {
+          local $SIG{ALRM} = sub { die "10 minute timeout exceeded" };
+          alarm 600;
+          print "running tests for $project\n";
+          my $start_time = time;
+          my $model;
+          eval {
+            $model = Test::TAP::Model::Visual->new_with_tests(glob("t/*.t t/*/t/*.t"));
+          };
+          my $duration = time - $start_time;
+          alarm 0; # cancel alarm
+        }
+        
         if ($@) {
           print "Tests aborted: $@\n";
         }


More information about the Rt-commit mailing list