This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate:
authorNicholas Clark <nick@ccl4.org>
Sun, 7 Mar 2004 01:08:35 +0000 (01:08 +0000)
committerNicholas Clark <nick@ccl4.org>
Sun, 7 Mar 2004 01:08:35 +0000 (01:08 +0000)
[ 22253]
Make Time/HiRes/t/HiRes.t die more gracefully if its watchdog
timeout triggers

[ 22418]
integrate Time::HiRes 1.56 from CPAN
(which is itself mostly derived from the bleedperl version)
p4raw-link: @22418 on //depot/perl: 1caec985a4c002b6acd7aaed08ebf5b117752c94
p4raw-link: @22253 on //depot/perl: b4c5c611165551aaef8a59a0e287e0f18687668b

p4raw-id: //depot/maint-5.8/perl@22453
p4raw-integrated: from //depot/perl@22450 'copy in'
ext/Time/HiRes/t/HiRes.t (@21567..) ext/Time/HiRes/Changes
(@22159..)
p4raw-integrated: from //depot/perl@22409 'ignore'
ext/Time/HiRes/HiRes.pm (@22159..)
p4raw-integrated: from //depot/perl@22258 'ignore'
ext/Time/HiRes/Makefile.PL (@21567..)

ext/Time/HiRes/Changes
ext/Time/HiRes/HiRes.pm
ext/Time/HiRes/Makefile.PL
ext/Time/HiRes/t/HiRes.t

index 2e4a383..7db2cf3 100644 (file)
@@ -1,5 +1,10 @@
 Revision history for Perl extension Time::HiRes.
 
+1.56
+       - Give a clearer message if the tests timeout (perl change #22253)
+       - Don't use /tmp or its moral equivalents (perl bug #15036,
+         perl change #22258)
+
 1.55
        - Windows: ming32 patch from Mike Pomraning (use Perl's Const64()
          instead of VC-specific i64 suffix)
index 50f42f2..574dfd4 100644 (file)
@@ -15,7 +15,7 @@ require DynaLoader;
                 d_usleep d_ualarm d_gettimeofday d_getitimer d_setitimer
                 d_nanosleep);
        
-$VERSION = '1.55';
+$VERSION = '1.56';
 $XS_VERSION = $VERSION;
 $VERSION = eval $VERSION;
 
index fc6a155..c48339c 100644 (file)
@@ -71,19 +71,11 @@ my $nop3 = *File::Spec::catfile;
 # without changing it, and then I'd always forget to change it before a
 # release. Sorry, Edward :)
 
-sub TMPDIR {
-    my $TMPDIR =
-       (grep(defined $_ && -d $_ && -w _,
-             ((defined $ENV{'TMPDIR'} ? $ENV{'TMPDIR'} : undef),
-              qw(/var/tmp /usr/tmp /tmp c:/temp))))[0];
-    $TMPDIR || die "Cannot find writable temporary directory.\n";
-}
-
 sub try_compile_and_link {
     my ($c, %args) = @_;
 
     my ($ok) = 0;
-    my ($tmp) = (($^O eq 'VMS') ? "sys\$scratch:tmp$$" : TMPDIR() . '/' . "tmp$$");
+    my ($tmp) = "tmp$$";
     local(*TMPC);
 
     my $obj_ext = $Config{obj_ext} || ".o";
@@ -388,7 +380,7 @@ sub doMakefile {
            'SUFFIX'   => 'gz',
        },
         clean => { FILES => "xdefine" },
-        realclean => {FILES=> 'const-c.inc const-xs.inc'},
+        realclean => { FILES=> 'const-c.inc const-xs.inc' },
     );
 
     if ($ENV{PERL_CORE}) {
@@ -453,7 +445,8 @@ EOM
             print  <<EOM;
 NOTE: if you get an error like this (the line number may vary):
 Makefile:91: *** missing separator
-then set the environment variable LC_ALL to "C" and retry.
+then set the environment variable LC_ALL to "C" and retry
+from scratch (re-run perl "Makefile.PL").
 
 EOM
         }
index 5e4128e..6903970 100644 (file)
@@ -42,7 +42,7 @@ if ($have_fork) {
        if ($pid == 0) { # We are the kid, set up the timer.
            print "# Timer process $$\n";
            sleep($waitfor);
-           warn "$0: Time's up!\n";
+           warn "\n$0: overall time allowed for tests (${waitfor}s) exceeded\n";
            print "# Terminating the testing process\n";
            kill('TERM', getppid());
            print "# Timer process exiting\n";