[VDSM] running tests locally

Hi, beginner question: I'm trying to run some VDSM tests locally (e.g. blocksd_test.py), using PYTHON_EXE=python3 ./run_tests_local.sh storage/blocksd_test.py but I'm getting quite a lot of test failures. Most of the tests fail because of mokeypatch fixture is not injected (see error bellow). What I'm doing wrong and how I can run selected tests locally? Thanks in advance Vojta ERROR: storage.blocksd_test.test_meta_size_max_val ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/nose/case.py", line 197, in runTest self.test(*self.arg) TypeError: test_meta_size_max_val() missing 1 required positional argument: 'monkeypatch'

On Fri, 19 Oct 2018, 16:45 Vojtech Juranek, <vjuranek@redhat.com> wrote:
Hi, beginner question: I'm trying to run some VDSM tests locally (e.g. blocksd_test.py), using
PYTHON_EXE=python3 ./run_tests_local.sh storage/blocksd_test.py
This works only for legacy test using nose. Storage tests use tox. tests/README explains how to run them. Lots of storage tests cannot run with python 3 yet because python 3 broke backward compatibilty. See tox.ini for list of incompatible tests. Nir
but I'm getting quite a lot of test failures. Most of the tests fail because of mokeypatch fixture is not injected (see error bellow).
What I'm doing wrong and how I can run selected tests locally? Thanks in advance Vojta
ERROR: storage.blocksd_test.test_meta_size_max_val ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/nose/case.py", line 197, in runTest self.test(*self.arg) TypeError: test_meta_size_max_val() missing 1 required positional argument: 'monkeypatch'_______________________________________________ Devel mailing list -- devel@ovirt.org To unsubscribe send an email to devel-leave@ovirt.org Privacy Statement: https://www.ovirt.org/site/privacy-policy/ oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/devel@ovirt.org/message/I3PK3WSDFRNXM6...

This works only for legacy test using nose.
Storage tests use tox. tests/README explains how to run them.
thanks for the pointers, works for me now. FIY: I've sent a PR [1] which updates instructions how to run VDSM tests [1] https://github.com/oVirt/ovirt-site/pull/1779

On 10/19/18 3:40 PM, Vojtech Juranek wrote: Hi,
Hi, beginner question: I'm trying to run some VDSM tests locally (e.g. blocksd_test.py), using
PYTHON_EXE=python3 ./run_tests_local.sh storage/blocksd_test.py
Please be aware some tests were not ported to python3. "blocksd_test.py" is among them.
What I'm doing wrong and how I can run selected tests locally?
I don't know about storage, but virt tests should be each one runnable using ./run_test_local.sh. (in general) I think we should preserve this property when we will move to py.test. Bests, -- Francesco Romani Senior SW Eng., Virtualization R&D Red Hat IRC: fromani github: @fromanirh

On Fri, 19 Oct 2018, 18:01 Francesco Romani, <fromani@redhat.com> wrote:
On 10/19/18 3:40 PM, Vojtech Juranek wrote:
Hi,
Hi, beginner question: I'm trying to run some VDSM tests locally (e.g. blocksd_test.py), using
PYTHON_EXE=python3 ./run_tests_local.sh storage/blocksd_test.py
Please be aware some tests were not ported to python3. "blocksd_test.py" is among them.
What I'm doing wrong and how I can run selected tests locally?
I don't know about storage, but virt tests should be each one runnable using ./run_test_local.sh.
(in general) I think we should preserve this property when we will move to py.test.
run_test* scripts are legacy that should be elinimated. tox replaces these script, building the enviroment, intalling tools, running tests with several versions of python, supporting testing of multiple testenvs, single testenv, single file, and using pytest options, selecting or rejecting tests by name or marks (e.g slow).
Bests,
-- Francesco Romani Senior SW Eng., Virtualization R&D Red Hat IRC: fromani github: @fromanirh _______________________________________________ Devel mailing list -- devel@ovirt.org To unsubscribe send an email to devel-leave@ovirt.org Privacy Statement: https://www.ovirt.org/site/privacy-policy/ oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/devel@ovirt.org/message/O5DIOKFUBCVV55...
participants (3)
-
Francesco Romani
-
Nir Soffer
-
Vojtech Juranek