Commit 38e924b9 authored by Bjorn Munch's avatar Bjorn Munch

Bug #49210 Enable MTR timeout configuration through environment variables

Define env. vars for both timeout settings
Also incorporated 5.0 patch into mtr version 1
parents 18761a92 b13ed297
...@@ -1102,14 +1102,16 @@ sub command_line_setup () { ...@@ -1102,14 +1102,16 @@ sub command_line_setup () {
if ( ! $opt_testcase_timeout ) if ( ! $opt_testcase_timeout )
{ {
$opt_testcase_timeout= $default_testcase_timeout; $opt_testcase_timeout=
$ENV{MTR_TESTCASE_TIMEOUT} || $default_testcase_timeout;
$opt_testcase_timeout*= 10 if $opt_valgrind; $opt_testcase_timeout*= 10 if $opt_valgrind;
$opt_testcase_timeout*= 10 if ($opt_debug and $glob_win32); $opt_testcase_timeout*= 10 if ($opt_debug and $glob_win32);
} }
if ( ! $opt_suite_timeout ) if ( ! $opt_suite_timeout )
{ {
$opt_suite_timeout= $default_suite_timeout; $opt_suite_timeout=
$ENV{MTR_SUITE_TIMEOUT} || $default_suite_timeout;
$opt_suite_timeout*= 6 if $opt_valgrind; $opt_suite_timeout*= 6 if $opt_valgrind;
$opt_suite_timeout*= 6 if ($opt_debug and $glob_win32); $opt_suite_timeout*= 6 if ($opt_debug and $glob_win32);
} }
......
...@@ -198,10 +198,10 @@ my $opt_mark_progress; ...@@ -198,10 +198,10 @@ my $opt_mark_progress;
my $opt_sleep; my $opt_sleep;
my $opt_testcase_timeout= 15; # minutes my $opt_testcase_timeout= $ENV{MTR_TESTCASE_TIMEOUT} || 15; # minutes
my $opt_suite_timeout = 300; # minutes my $opt_suite_timeout = $ENV{MTR_SUITE_TIMEOUT} || 300; # minutes
my $opt_shutdown_timeout= 10; # seconds my $opt_shutdown_timeout= $ENV{MTR_SHUTDOWN_TIMEOUT} || 10; # seconds
my $opt_start_timeout = 180; # seconds my $opt_start_timeout = $ENV{MTR_START_TIMEOUT} || 180; # seconds
sub testcase_timeout { return $opt_testcase_timeout * 60; }; sub testcase_timeout { return $opt_testcase_timeout * 60; };
sub suite_timeout { return $opt_suite_timeout * 60; }; sub suite_timeout { return $opt_suite_timeout * 60; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment