summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Kutik <daniel.kutik@lavawerk.com>2022-11-25 16:59:49 +0100
committerMike Frysinger <vapier@google.com>2022-11-26 23:30:37 +0000
commit4364a79088a8b9d9cfe49e111ea9013cdbfb735c (patch)
treeda95ce7c8675358e3d6d82d75669604a9fb1cac1
parenta98a5ebc6d96ea8e62e44bef5c3180e319a246c0 (diff)
downloadgit-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.ini7
1 files changed, 6 insertions, 1 deletions
diff --git a/tox.ini b/tox.ini
index 1d072f6f..feb328e0 100644
--- a/tox.ini
+++ b/tox.ini
@@ -26,9 +26,14 @@ python =
26 3.10: py310 26 3.10: py310
27 27
28[testenv] 28[testenv]
29deps = pytest 29deps =
30 pytest
31 pytest-timeout
30commands = {envpython} run_tests 32commands = {envpython} run_tests
31setenv = 33setenv =
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]
39timeout = 300