- Timestamp:
- 08/06/08 20:57:19 (4 months ago)
- Location:
- util
- Files:
-
- 2 modified
-
run-smoke.pl (modified) (2 diffs)
-
yaml_harness.pl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
util/run-smoke.pl
r21645 r21814 31 31 32 32 my $failed = 0; 33 for (qw/YAML Test::TAP::Model Test::TAP::HTMLMatrix Best Time::Out/) {33 for (qw/YAML Test::TAP::Model Test::TAP::HTMLMatrix Best/) { 34 34 check_prereq($_) or $failed++; 35 35 } … … 43 43 44 44 cpan Task::Smoke 45 cpan Time::Out46 45 EOF 47 46 -
util/yaml_harness.pl
r21808 r21814 278 278 my @rest = @_; 279 279 my $kid = $self->{_child_num} ? "[$self->{_child_num}] " : ""; 280 warn "$kid$test\n"; 281 use Time::HiRes; 282 use Time::Out 'timeout'; 283 my $t = timeout(10, sub { timeit( 1, 280 281 local $ENV{PUGS_TIMEOUT} ||= 60; 282 my $t = timeit( 1, 284 283 sub { $self->SUPER::run_test($test, @rest) } 285 ) }); 286 if ($Test::Harness::Straps::GLOBAL_FH) { 287 warn $Test::Harness::Straps::GLOBAL_FH; 288 die "We really want to kill ths FH child here... but how?"; 289 close $Test::Harness::Straps::GLOBAL_FH; 290 } 284 ); 291 285 warn " ".timestr($t)."\n"; 292 286 } 293 287 294 use Test::Harness::Straps ();295 296 package Test::Harness::Straps;297 use vars '$GLOBAL_FH';298 no warnings 'redefine';299 300 sub analyze_fh {301 my($self, $name, $fh) = @_;302 $GLOBAL_FH = $fh;303 304 my $it = Test::Harness::Iterator->new($fh);305 306 my $results;307 $results = $self->_analyze_iterator($name, $it);308 undef $GLOBAL_FH;309 return $results;310 }311 288 __END__ 312 289 # Simple YAML test harness written over Test::Harness::Straps.
