diff options
author | Thibault Saunier <tsaunier@gnome.org> | 2016-12-02 09:58:56 -0300 |
---|---|---|
committer | Thibault Saunier <tsaunier@gnome.org> | 2016-12-02 20:04:33 -0300 |
commit | e2782f7864362729417ca2810f33d67fe6d0e80d (patch) | |
tree | ea863bb4b8c321b858713766b4b5676b16508cea /mesontest.py | |
parent | 56a6f86827e433b7dc254308e75dfe01bcb0eb8a (diff) | |
download | meson-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.
Diffstat (limited to 'mesontest.py')
-rwxr-xr-x | mesontest.py | 6 |
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: |