Add option to select test cases by markers
Change-Id: I773b710eb4f4a8abb1cebc13088d3cc16ff08334
This commit is contained in:
parent
0aa2a7b42f
commit
886f21cb2e
@ -191,6 +191,12 @@ subparsers:
|
|||||||
type: Value
|
type: Value
|
||||||
help: Extra options to be passed to PyTest
|
help: Extra options to be passed to PyTest
|
||||||
ansible_variable: pytest_addopts
|
ansible_variable: pytest_addopts
|
||||||
|
pytest-markers:
|
||||||
|
type: Value
|
||||||
|
help: >
|
||||||
|
only run tests matching given mark expression.
|
||||||
|
For example: --pytest-markers 'mark1 and not mark2'.
|
||||||
|
ansible_variable: pytest_markers
|
||||||
pytest-maxfail:
|
pytest-maxfail:
|
||||||
type: Value
|
type: Value
|
||||||
help: Max number of test case failures before aborting
|
help: Max number of test case failures before aborting
|
||||||
|
@ -21,7 +21,7 @@ tox_constraints: ''
|
|||||||
|
|
||||||
tox_constrain_env:
|
tox_constrain_env:
|
||||||
PYTEST_ADDOPTS: >
|
PYTEST_ADDOPTS: >
|
||||||
{% if not test_flaky%}-m 'not flaky'{% endif %}
|
{% if pytest_markers %}-m '{{ pytest_markers }}'{% endif %}
|
||||||
{% if pytest_maxfail %}--maxfail '{{ pytest_maxfail }}'{% endif %}
|
{% if pytest_maxfail %}--maxfail '{{ pytest_maxfail }}'{% endif %}
|
||||||
{{ pytest_addopts }}
|
{{ pytest_addopts }}
|
||||||
TOX_REPORT_DIR: '{{ tox_report_dir }}'
|
TOX_REPORT_DIR: '{{ tox_report_dir }}'
|
||||||
@ -37,5 +37,6 @@ tox_expected_rcs:
|
|||||||
ignore_test_failures: no
|
ignore_test_failures: no
|
||||||
|
|
||||||
pytest_addopts: ''
|
pytest_addopts: ''
|
||||||
|
pytest_markers: "{% if not test_flaky%}not flaky{% endif %}"
|
||||||
pytest_maxfail: ''
|
pytest_maxfail: ''
|
||||||
test_flaky: false
|
test_flaky: false
|
||||||
|
Loading…
Reference in New Issue
Block a user