From c374f169fdf79428d258faf59c1cdd800974994d Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 5 Jul 2023 22:23:34 +0200 Subject: test: add a 2000-iteration basic repository test --- test/CMakeLists.txt | 9 ++++++--- test/py/test_repo.py | 7 +++++++ test/pytest.ini | 3 +++ 3 files changed, 16 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index b8a115c..e68ff45 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -16,9 +16,12 @@ function(add_python_tests name) set_tests_properties("${name}" PROPERTIES TIMEOUT 300) endfunction() -add_python_tests(python_tests - Python3::Interpreter -m pytest ${python_test_args}) +add_python_tests(python_tests_sanity + Python3::Interpreter -m pytest ${python_test_args} -m "not stress") + +add_python_tests(python_tests_stress + Python3::Interpreter -m pytest ${python_test_args} -m "stress") add_python_tests(python_tests_valgrind - Python3::Interpreter -m pytest ${python_test_args} + Python3::Interpreter -m pytest ${python_test_args} -m "not stress" --valgrind-binary "${CMAKE_CURRENT_SOURCE_DIR}/../src/valgrind.sh") diff --git a/test/py/test_repo.py b/test/py/test_repo.py index abc7f18..2c995e1 100644 --- a/test/py/test_repo.py +++ b/test/py/test_repo.py @@ -3,6 +3,8 @@ # For details, see https://github.com/egor-tensin/cimple. # Distributed under the MIT License. +import pytest + from lib.process import LoggingEvent @@ -45,3 +47,8 @@ def test_repo_2(server_and_workers, test_repo, client): def test_repo_10(server_and_workers, test_repo, client): _test_repo_internal(server_and_workers, test_repo, client, 10) + + +@pytest.mark.stress +def test_repo_2000(server_and_workers, test_repo, client): + _test_repo_internal(server_and_workers, test_repo, client, 2000) diff --git a/test/pytest.ini b/test/pytest.ini index cdc0831..766e409 100644 --- a/test/pytest.ini +++ b/test/pytest.ini @@ -3,3 +3,6 @@ log_format = %(asctime)s | %(levelname)s | %(message)s log_date_format = %Y-%m-%d %H:%M:%S log_cli_level = INFO #log_cli = 1 + +markers = + stress: Big tests; don't run them w/ Valgrind or in QEMU -- cgit v1.2.3