Skip to content

Commit

Permalink
Update instructions how to run VDSM tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vjuranek committed Oct 19, 2018
1 parent 0917b98 commit d9af38f
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions source/develop/developer-guide/vdsm/developers.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,15 @@ Running all the tests is too slow during development. It is recommended
to run the relevant module tests while making changes, and run the
entire test suite before submitting a patch.

Legacy tests use `nose`, newer tests use `pytest` and `tox`.
Following sub-sections provide a quick reference how to run either `nose` or `pytest`.
Please see `tests/README` for more details about the VDSM tests and how to run them.

#### Running specific nose tests

Please note that `run_test*` scripts are legacy and can be removed in the future.
Preffered way how to run tests is using `tox`.

To run specific tests:

cd tests
Expand All @@ -131,6 +140,19 @@ To run using different python executable:

PYTHON_EXE=python3 ./run_tests_local.sh foo_test.py bar_test.py

#### Running specific pytest tests

To run specific module with `tox`:

tox -e storage-py27,storage-py36

To run specific test direcly via `pytest`:

cd tests
export PYTHONPATH=../lib/
pytest storage/blocksd_test.py


## Building a VDSM RPM

To create an RPM:
Expand Down

0 comments on commit d9af38f

Please sign in to comment.