Run tests using tox
As these two branches have diverged a bit, and the master branch has seen fair bit of churn lately, it was not trivial to simply cherry-pick the changes.
Some related merge reqtests are: !874 (merged), !1027 (merged), !1037 (merged) and !1051 (merged).
-
conftest.py: Don't use deprecated get_marker() function
Starting from `pytest` version 4.1.0, `Node.get_marker()` has been removed, and hence our tests break when running with newer versions of `pytest`. It was deprecated since a while back but it has recently been removed completely. Use `get_closest_marker()` as a replacement that is suggested in the changelog, and seems to work fine for our use case. See https://github.com/pytest-dev/pytest/pull/4564 for more context on the upstream issue. One way of verifying this change is that this should fix the recently added `tests-fedora-update-deps` job, that was failing before due to this issue. (cherry picked from commit c91784abcdfebef2e1e70612193b67efe7fa016a)
-
Add requirements files for install, test and plugin dependencies
Add `.in` and `.txt` requirements files for BuildStream's pure python dependencies. For each pair, the `.in` file is supposed to capture the loose version requirements, and the corresponding `.txt` file is supposed to have frozen requirements. We have 3 such sets: * `requirements`: BuildStream's runtime dependencies * `dev-requirements`: Dependencies for running tests * `plugin-requirements`: Dependencies for core plugins Note that the frozen requirements files will only be used for testing purposes, and `setup.py` will continue to read loose requirements. This commit comes with a Makefile to update the requirements files as well. --- !1027 is related MR for the master branch.
-
Add tox.ini from master branch
`tox.ini` has seen heavy churn lately, and backporting individual commits is turning out to be a more involved process as the two branches have diverged a bit. So, this is more or less copy-pasted from the master branch, without a separate lint job. Since switching to `pycodestyle` will require some code formatting changes, that does not seem reasonable to apply to this branch. So, let's stick with running the linters via `pytest`.
-
.gitignore: Ingnore tox, pytest, coverage files
-
.gitlab-ci.yml: Run tests using tox
This commit a backport of a handful of merge requests to master. As these two branches have diverged a bit and the master branch has seen a fair bit of churn lately, it was not trivial to simply cherry-pick the changes.
-
bst2html.py: Name the second argument to avoid an error
(cherry picked from commit 1fd38fb74c81d39ca7500d9b7f77c67430ed7852) Backport of !874.
-
.coveragerc: Omit some things which are irrelevant to cover.
* Omit versioneer's _version.py * Omit our __main__.py which is used only internally for generating documentation (cherry picked from commit 116c1070c893c4b5bd2505ea39157f1b37946092)
-
.coveragerc: Omit .tox/ directory from coverage stats
This is the relevant bit of change from the MR !1051, to fix the coverage stats.