Skip to content

Commit

Permalink
Build results of 66d4baf (on master)
Browse files Browse the repository at this point in the history
  • Loading branch information
kentfredric committed Jul 1, 2015
1 parent c40cea0 commit fce5dbd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Release history for Dist-Zilla-Role-Bootstrap

1.001002 2015-07-01T03:50:21Z 76807b9
1.001002 2015-07-01T04:05:24Z 66d4baf
[Bugfix]
- Bodge around testers with broken mtime implementations by agressively trying to make files with seperate mtimes and
then skipping all the tests if that isnt possible, with a grace window of up to 5 seconds to get it right.
Expand Down
10 changes: 4 additions & 6 deletions t/02-try-built-mtime.t
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ for my $scratch_id ( 0 .. $#scratches ) {
my $sleep_step = 0.3; # Start intentionally slow to hopefully hit a subsecond transition.
my $elapsed = 0.0;

note "Attempt " . ( $tries + 1 ) . " at creating " . $scratch . " @" . gmtime . "( elapsed: $elapsed )";
$scratch->child('lib')->mkpath;
while ( $scratch->stat->mtime <= $scratches[ $scratch_id - 1 ]->stat->mtime ) {
while ( not -e $scratch or $scratch->stat->mtime <= $scratches[ $scratch_id - 1 ]->stat->mtime ) {
$tries++;
if ( $elapsed > 5 ) {
diag "Your system has a broken clock/filesystem and mtime based tests cant work";
Expand All @@ -72,12 +70,12 @@ for my $scratch_id ( 0 .. $#scratches ) {

select( undef, undef, undef, $sleep_step );
$elapsed += $sleep_step;
note "Attempt " . ( $tries + 1 ) . " at creating " . $scratch . " @" . gmtime . "( elapsed: $elapsed )";
$scratch->remove_tree();
note "Attempt " . ($tries) . " at creating " . $scratch . " @" . (gmtime) . "( elapsed: $elapsed )";
$scratch->remove_tree() if -e $scratch;
$scratch->child('lib')->mkpath;
$sleep_step = $sleep_step * 2; # Exponentially larger steps to find clock slew as fast as possible
}
note "Succcess @" . gmtime . "( elapsed: $elapsed )";
note "Succcess @" . (gmtime) . "( elapsed: $elapsed )";
}
chdir $scratch->stringify;

Expand Down

0 comments on commit fce5dbd

Please sign in to comment.