diff options
author | Chandan Singh <chandan@chandansingh.net> | 2019-12-06 15:14:32 +0000 |
---|---|---|
committer | Chandan Singh <chandan@chandansingh.net> | 2019-12-23 09:33:21 +0000 |
commit | 8a9e3cb9f71e3cac683af1ff667e4de8ef802132 (patch) | |
tree | 490267b4aca938f21afedbcdb6c1da14bd8ad709 /doc | |
parent | bb93d63fd9a081eef14c20bec818d60084d065c3 (diff) | |
download | buildstream-8a9e3cb9f71e3cac683af1ff667e4de8ef802132.tar.gz |
Drop support for `setup.py test`
Drop support for running tests via `setup.py test`, that is considered
deprecated. `tox` is our primary frontend for running tests, so this
change ensures that we don't have to support multiple ways of running
tests.
For testing against a specific installation environment, `tox` is not
quite practical. But in these cases, one can run `pytest` directly. So,
there is no need for this additional indirection.
This was discussed in the following mailing list thread:
https://mail.gnome.org/archives/buildstream-list/2019-December/msg00006.html.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/source/hacking/using_the_testsuite.rst | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/doc/source/hacking/using_the_testsuite.rst b/doc/source/hacking/using_the_testsuite.rst index 0e476c7de..720c910c4 100644 --- a/doc/source/hacking/using_the_testsuite.rst +++ b/doc/source/hacking/using_the_testsuite.rst @@ -120,21 +120,27 @@ can run ``tox`` with ``-r`` or ``--recreate`` option. execute the test suite against a specific installation environment using pytest directly:: - ./setup.py test - - Specific options can be passed to ``pytest`` using the ``--addopts`` - option:: - - ./setup.py test --addopts 'tests/frontend/buildtrack.py::test_build_track' + pytest If you want to run coverage, you will need need to add ``BST_CYTHON_TRACE=1`` to your environment if you also want coverage on cython files. You could then get coverage by running:: - BST_CYTHON_TRACE=1 coverage run ./setup.py test + BST_CYTHON_TRACE=1 coverage run pytest + + Note that you will have to have all dependencies installed already, when + running tests directly via ``pytest``. This includes the following: + + * Cython and Setuptools, as build dependencies + * Runtime dependencies and test dependencies are specified in requirements + files, present in the ``requirements`` subdirectory. Refer to the ``.in`` + files for loose dependencies and ``.txt`` files for fixed version of all + dependencies that are known to work. + * Additionally, if you are running tests that involve external plugins, you + will need to have those installed as well. - Note that to be able to run ``./setup.py test``, you will need to have ``Cython`` - installed. + You can also have a look at our tox configuration in ``tox.ini`` file if you + are unsure about dependencies. .. tip:: |