mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-21 17:10:35 +00:00
This commit introduces pure pytest logging into a file Previously, test.py used pytest as a script(not a framework) and just captured pytest stdout and logged this data by itself This commit sets up the log files format that additionaly display Python processName, threadName adn taskName because test.py test cases use them, and now it is so hard to investigate issues that are connected with parallelism inside test case themselve In addition, commit splits the logging of different pytest workers(xdist) into different files. If pytest workers have ho failed test - log file for these workers will be deleted There is also additional logging for failures that will contain a separate file per test failure and contain the error itself (stacktrace) and all capture logs from stdout, stderr during the test run. With --save-log-on-success it will be a separate file per test on pass as well All this new functionality works with the new xdit scheduler (--test-py-init=True) Fixes SCYLLADB-713 Closes scylladb/scylladb#28705
54 lines
3.2 KiB
INI
54 lines
3.2 KiB
INI
[pytest]
|
|
asyncio_mode = auto
|
|
asyncio_default_fixture_loop_scope = session
|
|
|
|
junit_logging = all
|
|
junit_log_passing_tests = False
|
|
|
|
log_format = %(asctime)s.%(msecs)03d %(levelname)s> %(message)s
|
|
log_date_format = %H:%M:%S
|
|
|
|
log_file_format = %(asctime)s.%(msecs)03d %(processName)s %(threadName)s %(taskName)s %(levelname)s %(name)s> %(message)s
|
|
log_file_level = DEBUG
|
|
|
|
markers =
|
|
slow: tests that take more than 30 seconds to run
|
|
replication_factor: replication factor for RandomTables
|
|
without_scylla: run without attaching to a scylla process
|
|
enable_tablets: create keyspace with tablets enabled or disabled
|
|
repair: tests for repair
|
|
cpp: marker for c++ tests
|
|
prepare_3_nodes_cluster: prepare 3 nodes cluster for test case based on suite.yaml (all tests from old topology folder)
|
|
prepare_3_racks_cluster: prepare 3 nodes cluster in 1 dc and 3 racks for test case based on suite.yaml
|
|
single_node: test that are mark like this, should be using only one node, and should boot much quicker (dtest only)
|
|
exclude_errors: do not consider a logging message as an error if it contains any of the specified strings (dtest only)
|
|
cluster_options: specify cluster options used to initialize a cluster (dtest only)
|
|
unstable: mark for unstable tests that may pass may fail, these tests will continue to run every night and generate up-to-date statistics with failures without failing the “Main” verification path(scylla-ci, Next)
|
|
nightly: for tests that are quite old, stable, and test functionality that rather not be changed or affected by other features, are partially covered in other tests, verify non-critical functionality, have not found any issues or regressions, too long to run on every PR, and can be popped out from the CI run, but will continue run in Next/Nightly verification
|
|
skip_mode: Can be used to mark a test to be skipped for a specific mode, e.g. dev. The reason to skip a test should be specified, used as a comment only. Additionally, platform_key can be specified to limit the scope of the attribute to the specified platform. Example platform_key-s: [aarch64, x86_64]
|
|
|
|
norecursedirs = manual perf lib
|
|
# Ignore warnings about HTTPS requests without certificate verification
|
|
# (see issue #15287). Pytest breaks urllib3.disable_warnings() in conftest.py,
|
|
# so we need to do this here.
|
|
#
|
|
# Ignore warning of
|
|
# PytestWarning: record_property is incompatible with junit_family 'xunit2' (use 'legacy' or 'xunit1')
|
|
# Because `record_property` adds <properties> inside <testcase>, which is not allowed
|
|
# as per the latest xunit2 schema. see
|
|
# https://github.com/windyroad/JUnit-Schema/blob/master/JUnit.xsdtestcase,
|
|
# an alternative is `record_testsuite_property`, but we want to attach test
|
|
# log on a per-test basis. so let's continue using this feature before
|
|
# switching to xunit1 or legacy.
|
|
filterwarnings =
|
|
ignore::urllib3.exceptions.InsecureRequestWarning
|
|
ignore:record_property is incompatible with junit_family:pytest.PytestWarning
|
|
ignore::DeprecationWarning:importlib._bootstrap
|
|
ignore::DeprecationWarning:botocore
|
|
ignore::DeprecationWarning:pytest_elk_reporter
|
|
|
|
tmp_path_retention_count = 1
|
|
tmp_path_retention_policy = failed
|
|
|
|
python_files = test_*.py *_test.py *_tests.py
|