From 275c737d571709f0653c24d18a3adb14bbd9cb2f Mon Sep 17 00:00:00 2001 From: Hemmo Nieminen Date: Sat, 3 Mar 2018 02:08:29 +0200 Subject: [PATCH] Fix test setup's timeout_multiplier handling. --- mesonbuild/mtest.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py index d36bf2895..85fe9433c 100644 --- a/mesonbuild/mtest.py +++ b/mesonbuild/mtest.py @@ -90,7 +90,7 @@ parser.add_argument('-v', '--verbose', default=False, action='store_true', help='Do not redirect stdout and stderr') parser.add_argument('-q', '--quiet', default=False, action='store_true', help='Produce less output to the terminal.') -parser.add_argument('-t', '--timeout-multiplier', type=float, default=1, +parser.add_argument('-t', '--timeout-multiplier', type=float, default=None, help='Define a multiplier for test timeout, for example ' ' when running tests in particular conditions they might take' ' more time to execute.') @@ -303,8 +303,10 @@ class TestHarness: kill_test = False if test.timeout is None: timeout = None - else: + elif test_opts.timeout_multiplier is not None: timeout = test.timeout * test_opts.timeout_multiplier + else: + timeout = test.timeout try: (stdo, stde) = p.communicate(timeout=timeout) except subprocess.TimeoutExpired: