From: Peter Rabbitson Date: Sat, 29 Dec 2012 10:02:58 +0000 (+0100) Subject: Reduce amount of torture tests - too slow on some OSes X-Git-Tag: v0.03~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FDevel-PeekPoke.git;a=commitdiff_plain;h=c1ec81b529918670b355c2e13be49b361d169dd4 Reduce amount of torture tests - too slow on some OSes --- diff --git a/t/03torture.t b/t/03torture.t index 6e4eb6b..ba674ce 100644 --- a/t/03torture.t +++ b/t/03torture.t @@ -28,7 +28,7 @@ my $str_pv_addr = unpack(PTR_PACK_TYPE, pack('p', $str) ); is( peek($str_pv_addr, $len + 1), $str . "\0", 'peek as expected (with NUL termination)' ); -for (1 .. ($ENV{AUTOMATED_TESTING} ? 200 : 20 ) ) { +for (1 .. ($ENV{AUTOMATED_TESTING} ? 200 : 5 ) ) { for my $poke_size (2 .. $len) { my $replace_chunk = 'a' . ( '0' x ($poke_size-1) ); for my $poke_start ( 0 .. ($len - $poke_size) ) { diff --git a/t/04thread-torture.t b/t/04thread-torture.t index fa35099..8f09b3a 100644 --- a/t/04thread-torture.t +++ b/t/04thread-torture.t @@ -20,6 +20,10 @@ share $::TEST_COUNT; # older perls crash if threads are spawned way too quickly, sleep for 100 msecs my @pool = map { sleep 0.1 and threads->create(\&run_torture) } (1..($ENV{AUTOMATED_TESTING} ? 20 : 5) ); + +# again - necessary for older perls +sleep 1; + for (@pool) { if ($_->join != 42) { die ($_->can('error') ? $_->error : "Thread did not finish successfully" );