Commit Graph

5 Commits

Author SHA1 Message Date
Andrei Chekun
7e34d5aa28 test.py: start pytest as a module instead of subprocess
Invoke the pytest as a module, instead of a separate process, to get access to
the terminal to be able to it interactively.
2025-09-05 11:54:49 +02:00
Evgeniy Naydanov
3a98331731 test.py: don't fail if use multiple tests from one dir in commandline
There is the stash item REPEATED_FILES for directory items which used to cut
recursion.  But if multiple tests from one directory added to ./test.py
commandline this solution prevents handling non-first tests well because
it was already collected for the first one.  Change behavior to not store
all repeated files in the stash but just files which are in the process
of repetition.  Rename the stash item to REPEATING_FILES to reflect this
change.

Closes scylladb/scylladb#25611
2025-08-21 19:43:13 +03:00
Evgeniy Naydanov
e44b26b809 test.py: pytest: support --mode/--repeat in a common way for all tests
Implement repetition of files using pytest_collect_file hook: run
file collection as many times as needed to cover all --mode/--repeat
combinations.  Also move disabled test logic to this hook.

Store build mode and run_id in pytest item stashes.

Simplify support of C++ tests: remove redundant facade abstraction and put
all code into 3 files: base.py, boost.py, and unit.py

Add support for `run_first` option in test_config.yaml
2025-08-17 15:26:23 +00:00
Evgeniy Naydanov
bffb6f3d01 test.py: pytest: streamline suite configuration handling
Move test_config.yaml handling code from common_cpp_conftest.py to
TestSuiteConfig class in test/pylib/runner.py
2025-08-17 12:32:36 +00:00
Evgeniy Naydanov
600d05471b test.py: refactor: move framework-related code to test.pylib.runner
Some test suites have own test runners based on pytest, and they
don't need all stuff we use for test.py.  Move all code related to
test.py framework to test/pylib/runner.py and use it as a plugin
conditionally (by using TEST_RUNNER variable.)
2025-08-17 12:32:35 +00:00