This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
t/re/speed.t: Adapt for sl-o-o-w boxes
authorKarl Williamson <khw@cpan.org>
Sun, 24 May 2020 18:48:35 +0000 (12:48 -0600)
committerSawyer X <xsawyerx@cpan.org>
Wed, 27 May 2020 08:09:32 +0000 (11:09 +0300)
On some slow smokers, this test times out.  There is an existing
mechanism which allows a smoker to compensate for this, but which was
not being used by this test file.  Use it.

t/re/speed.t

index 67a8cd8..e2d01ab 100644 (file)
@@ -42,7 +42,9 @@ run_tests() unless caller;
 sub run_tests {
 
 
-    watchdog(($::running_as_thread && $::running_as_thread) ? 150 : 225);
+    watchdog(($ENV{PERL_TEST_TIME_OUT_FACTOR} || 1)
+             * (($::running_as_thread && $::running_as_thread)
+                ? 150 : 225));
 
     {
         # [perl #120446]