diff options
author | Daniel Kutik <daniel.kutik@lavawerk.com> | 2022-11-25 16:59:49 +0100 |
---|---|---|
committer | Mike Frysinger <vapier@google.com> | 2022-11-26 23:30:37 +0000 |
commit | 4364a79088a8b9d9cfe49e111ea9013cdbfb735c (patch) | |
tree | da95ce7c8675358e3d6d82d75669604a9fb1cac1 | |
parent | a98a5ebc6d96ea8e62e44bef5c3180e319a246c0 (diff) | |
download | git-repo-4364a79088a8b9d9cfe49e111ea9013cdbfb735c.tar.gz |
tox: Make all tests timeout after 5min
Use pytest-timeout to make sure tests don't get stuck for more than
5 minutes. In future individual tests can exceed this timeout by
being decorated with @pytest.mark.timeout(600).
Signed-off-by: Daniel Kutik <daniel.kutik@lavawerk.com>
Change-Id: I8f5b61a20230c22a86fd5636297c78f41369449a
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/353124
Reviewed-by: Mike Frysinger <vapier@google.com>
-rw-r--r-- | tox.ini | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -26,9 +26,14 @@ python = | |||
26 | 3.10: py310 | 26 | 3.10: py310 |
27 | 27 | ||
28 | [testenv] | 28 | [testenv] |
29 | deps = pytest | 29 | deps = |
30 | pytest | ||
31 | pytest-timeout | ||
30 | commands = {envpython} run_tests | 32 | commands = {envpython} run_tests |
31 | setenv = | 33 | setenv = |
32 | GIT_AUTHOR_NAME = Repo test author | 34 | GIT_AUTHOR_NAME = Repo test author |
33 | GIT_COMMITTER_NAME = Repo test committer | 35 | GIT_COMMITTER_NAME = Repo test committer |
34 | EMAIL = repo@gerrit.nodomain | 36 | EMAIL = repo@gerrit.nodomain |
37 | |||
38 | [pytest] | ||
39 | timeout = 300 | ||