On Wed, Apr 03, 2002 at 09:48:29PM +0200, [EMAIL PROTECTED] wrote:
> On Wed, Apr 03, 2002 at 02:35:04PM -0500, Michael G Schwern wrote:
> > On Wed, Apr 03, 2002 at 06:13:23PM +0200, [EMAIL PROTECTED] wrote:
> > > .../lib/ExtUtils/t/basic.t 1 256 15 1 6.67% 6
> >
> > Are you, by any chance, building on an NFS partition?
>
> Yes.
Good. NFS drift was taken into account in the CPAN version of that test.
If you can't wait, here's the patch.
--- lib/ExtUtils/t/basic.t 30 Mar 2002 09:16:06 -0000 1.12
+++ lib/ExtUtils/t/basic.t 30 Mar 2002 22:35:36 -0000 1.13
@@ -25,6 +25,8 @@
perl_lib;
+my $Touch_Time = calibrate_mtime();
+
$| = 1;
ok( chdir 'Big-Fat-Dummy', "chdir'd to Big-Fat-Dummy" ) ||
@@ -56,14 +58,9 @@
ok( -e $makefile, 'Makefile exists' );
-# -M is flakey on VMS, flat out broken on Tru64 5.6.0
-SKIP: {
- skip "stat a/mtime broken on Tru64 5.6.0", 1 if $^O eq 'dec_osf' and
- $] >= 5.006;
-
- my $mtime = (stat($makefile))[9];
- cmp_ok( $^T, '<=', $mtime, ' its been touched' );
-}
+# -M is flakey on VMS
+my $mtime = (stat($makefile))[9];
+cmp_ok( $Touch_Time, '<=', $mtime, ' its been touched' );
END { unlink makefile_name(), makefile_backup() }
--- t/lib/MakeMaker/Test/Utils.pm 30 Mar 2002 07:31:35 -0000 1.5
+++ t/lib/MakeMaker/Test/Utils.pm 30 Mar 2002 22:35:36 -0000 1.6
@@ -12,7 +12,7 @@
$VERSION = 0.01;
@EXPORT = qw(which_perl perl_lib makefile_name makefile_backup
- make make_run make_macro
+ make make_run make_macro calibrate_mtime
);
my $Is_VMS = $^O eq 'VMS';
@@ -36,6 +36,8 @@
my $make_run = make_run;
make_macro($make, $targ, %macros);
+ my $mtime = calibrate_mtime;
+
=head1 DESCRIPTION
A consolidation of little utility functions used through out the
@@ -202,6 +204,25 @@
}
return $is_mms ? "$make$macros $target" : "$make $target $macros";
+}
+
+=item B<calibrate_mtime>
+
+ my $mtime = calibrate_mtime;
+
+When building on NFS, file modification times can often lose touch
+with reality. This returns the mtime of a file which has just been
+touched.
+
+=cut
+
+sub calibrate_mtime {
+ open(FILE, ">calibrate_mtime.tmp") || die $!;
+ print FILE "foo";
+ close FILE;
+ my($mtime) = (stat('calibrate_mtime.tmp'))[9];
+ unlink 'calibrate_mtime.tmp';
+ return $mtime;
}
=back
--
Michael G. Schwern <[EMAIL PROTECTED]> http://www.pobox.com/~schwern/
Perl Quality Assurance <[EMAIL PROTECTED]> Kwalitee Is Job One
Cuius rei demonstrationem mirabilem sane detexi hanc subcriptis
exigutias non caperet.