diff options
-rw-r--r-- | Dockerfile | 2 | ||||
-rw-r--r-- | Makefile | 29 | ||||
-rw-r--r-- | test/CMakeLists.txt | 9 | ||||
-rw-r--r-- | test/py/test_repo.py | 7 | ||||
-rw-r--r-- | test/pytest.ini | 3 |
5 files changed, 40 insertions, 10 deletions
@@ -25,7 +25,7 @@ RUN cd -- "$src_dir" && \ "DEFAULT_PORT=$DEFAULT_PORT" \ "INSTALL_PREFIX=$install_dir" && \ ulimit -n 1024 && \ - make test CONFIGURATION="$CONFIGURATION" + make test/docker FROM base @@ -45,21 +45,38 @@ build: install: build cmake --install '$(call escape,$(cmake_dir))' -.PHONY: test -test: +.PHONY: test/sanity +test/sanity: @echo ----------------------------------------------------------------- - @echo Running tests + @echo Running sanity tests @echo ----------------------------------------------------------------- ctest --test-dir '$(call escape,$(cmake_dir))' \ - --verbose --exclude-regex python_tests_valgrind + --verbose --tests-regex python_tests_sanity .PHONY: test/valgrind test/valgrind: @echo ----------------------------------------------------------------- - @echo Running tests w/ Valgrind + @echo Running sanity tests w/ Valgrind @echo ----------------------------------------------------------------- ctest --test-dir '$(call escape,$(cmake_dir))' \ --verbose --tests-regex python_tests_valgrind +.PHONY: test/stress +test/stress: + @echo ----------------------------------------------------------------- + @echo Running stress tests + @echo ----------------------------------------------------------------- + ctest --test-dir '$(call escape,$(cmake_dir))' \ + --verbose --tests-regex python_tests_stress + +.PHONY: test/docker +test/docker: test/sanity + +.PHONY: test/local +test/local: test/sanity test/stress + +.PHONY: test +test: test/local + .PHONY: test/all -test/all: test test/valgrind +test/all: test/sanity test/stress test/valgrind 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 |