This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
re/fold_grind.t: Allow watchdog timeout to vary
authorKarl Williamson <khw@cpan.org>
Mon, 20 Feb 2017 07:46:05 +0000 (00:46 -0700)
committerKarl Williamson <khw@cpan.org>
Mon, 20 Feb 2017 08:07:02 +0000 (01:07 -0700)
If someone is running on a slow system, and they want fold_grind to
complete, they can now set an environment variable based on the relative
slowness of their system, that will be factored in to the length of the
timer.

t/re/fold_grind.t

index bf5c9fd..0665517 100644 (file)
@@ -11,7 +11,10 @@ BEGIN {
     if ($^O eq 'dec_osf') {
       skip_all("$^O cannot handle this test");
     }
-    watchdog(5 * 60);
+    my $time_out_factor = $ENV{PERL_TEST_TIME_OUT_FACTOR} || 1;
+    $time_out_factor = 1 if $time_out_factor < 1;
+
+    watchdog(5 * 60 * $time_out_factor);
     require './loc_tools.pl';
 }