From Dan Kenigsberg danken@redhat.com:
Dan Kenigsberg has submitted this change and it was merged. ( https://gerrit.ovirt.org/78633 )
Change subject: tests: Mark slow and stress tests using pytest.mark ......................................................................
tests: Mark slow and stress tests using pytest.mark
Replace @slowtest and @stresstest with pytest.marks.
When running from tox, slow and stress tests do not run but are not skipped; instead these they are reported as "deselected":
314 passed, 40 skipped, 91 deselected, 29 warnings in 22.40 seconds
When running directly, for example when running a single module tests, all tests run by default:
$ pytest storage/asyncevent_test.py ==================================================================================== test session starts ===================================================================================== platform linux -- Python 3.5.3, pytest-3.1.0, py-1.4.33, pluggy-0.4.0 rootdir: /home/nsoffer/src/vdsm/tests, inifile: collected 67 items
storage/asyncevent_test.py ...................................................................
================================================================================= 67 passed in 8.38 seconds ==================================================================================
To run only fast tests, disable slow or stress tests:
$ pytest -m "not (slow or stress)" storage/asyncevent_test.py ==================================================================================== test session starts ===================================================================================== platform linux -- Python 3.5.3, pytest-3.1.0, py-1.4.33, pluggy-0.4.0 rootdir: /home/nsoffer/src/vdsm/tests, inifile: collected 67 items
storage/asyncevent_test.py ................................
==================================================================================== 35 tests deselected ===================================================================================== ========================================================================== 32 passed, 35 deselected in 0.92 seconds ==========================================================================
Change-Id: I57eac4ad7eeadc4f95000d8bedc1651ecb8bcf60 Signed-off-by: Nir Soffer nsoffer@redhat.com --- M tests/storage/asyncevent_test.py M tests/storage/asyncutils_test.py M tests/storage/blockvolume_test.py M tests/storage/check_test.py M tests/storage/mount_test.py M tests/storage/qcow2_test.py M tests/storage/resourcemanager_test.py M tests/storage/rwlock_test.py M tests/storage/xlease_test.py M tox.ini 10 files changed, 57 insertions(+), 48 deletions(-)
Approvals: Adam Litke: Looks good to me, approved Nir Soffer: Verified Jenkins CI: Passed CI tests Irit Goihman: Looks good to me, but someone else must approve
vdsm-patches@lists.fedorahosted.org