aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test/py/test_repo.py
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-07-11 21:17:10 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-07-11 23:14:52 +0200
commit8619f8934a2762fa35d80b792ad349cd1128c1e9 (patch)
tree0078ea6f8f14c25a8ddbcf573d4e67dfa3dc3d32 /test/py/test_repo.py
parentsqlite: make some identifiers more readable (diff)
downloadcimple-8619f8934a2762fa35d80b792ad349cd1128c1e9.tar.gz
cimple-8619f8934a2762fa35d80b792ad349cd1128c1e9.zip
test: add test for segfaulting CI script
The C code leaked out of src/, so I moved .clang-format and some compile options to the root directory. Also, I'm starting to hit test execution limits; I'm going to limit the repositories used for stress testing.
Diffstat (limited to '')
-rw-r--r--test/py/test_repo.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/py/test_repo.py b/test/py/test_repo.py
index e3a498d..aa89261 100644
--- a/test/py/test_repo.py
+++ b/test/py/test_repo.py
@@ -62,6 +62,7 @@ def _test_repo_internal(env, repo, numof_processes, runs_per_process):
for id, status, ec, output, url, rev in runs:
assert status == 'finished', f'Invalid status for run {id}: {status}'
+ assert repo.run_exit_code_matches(ec), f"Exit code doesn't match: {ec}"
assert repo.run_output_matches(output), f"Output doesn't match: {output}"
@@ -80,6 +81,12 @@ def my_parametrize(names, values, ids=None, **kwargs):
return pytest.mark.parametrize(names, values, ids=ids, **kwargs)
+def test_sigsegv(sigsegv):
+ ec, output = sigsegv.try_run()
+ assert ec == -11
+ assert output == 'Started the test program.\n'
+
+
@my_parametrize('runs_per_client', [1, 5])
@my_parametrize('numof_clients', [1, 5])
def test_repo(env, test_repo, numof_clients, runs_per_client):
@@ -89,5 +96,5 @@ def test_repo(env, test_repo, numof_clients, runs_per_client):
@pytest.mark.stress
@my_parametrize(('numof_clients', 'runs_per_client'),
[(10, 50), (1, 2000), (4, 500)])
-def test_repo_stress(env, test_repo, numof_clients, runs_per_client):
- _test_repo_internal(env, test_repo, numof_clients, runs_per_client)
+def test_repo_stress(env, stress_test_repo, numof_clients, runs_per_client):
+ _test_repo_internal(env, stress_test_repo, numof_clients, runs_per_client)