aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@gnome.org>2016-12-02 09:58:56 -0300
committerThibault Saunier <tsaunier@gnome.org>2016-12-02 20:04:33 -0300
commite2782f7864362729417ca2810f33d67fe6d0e80d (patch)
treeea863bb4b8c321b858713766b4b5676b16508cea
parent56a6f86827e433b7dc254308e75dfe01bcb0eb8a (diff)
downloadmeson-e2782f7864362729417ca2810f33d67fe6d0e80d.zip
meson-e2782f7864362729417ca2810f33d67fe6d0e80d.tar.gz
meson-e2782f7864362729417ca2810f33d67fe6d0e80d.tar.bz2
tests: Allow user to change timeout time
For example if we know the tests takes more time because, for example we are tracing it, or running with very high debug log level we might not want the test to timeout.
-rwxr-xr-xmesontest.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/mesontest.py b/mesontest.py
index aaba053..cf10499 100755
--- a/mesontest.py
+++ b/mesontest.py
@@ -76,6 +76,10 @@ parser.add_argument('--num-processes', default=determine_worker_count(), type=in
help='How many parallel processes to use.')
parser.add_argument('-v', '--verbose', default=False, action='store_true',
help='Do not redirect stdout and stderr')
+parser.add_argument('-t', '--timeout-multiplier', type=float, default=1.0,
+ help='Define a multiplier for test timeout, for example '
+ ' when running tests in particular conditions they might take'
+ ' more time to execute.')
parser.add_argument('args', nargs='*')
class TestRun():
@@ -199,7 +203,7 @@ class TestHarness:
cwd=test.workdir,
preexec_fn=setsid)
timed_out = False
- timeout = test.timeout if not self.options.gdb else None
+ timeout = test.timeout * self.options.timeout_multiplier
try:
(stdo, stde) = p.communicate(timeout=timeout)
except subprocess.TimeoutExpired: