From Dan Kenigsberg <danken(a)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(a)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
--
To view, visit
https://gerrit.ovirt.org/78633
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I57eac4ad7eeadc4f95000d8bedc1651ecb8bcf60
Gerrit-PatchSet: 11
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Ala Hino <ahino(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland(a)redhat.com>
Gerrit-Reviewer: Irit Goihman <igoihman(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk <mlipchuk(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>