[aur-general] Exact purpose of check()

Morten Linderud foxboron at archlinux.org
Wed Jan 2 14:59:24 UTC 2019


On Wed, Jan 02, 2019 at 03:44:46PM +0100, Julien Nicoulaud via aur-general wrote:
> There is a bit of debate at the borgmatic package (
> https://aur.archlinux.org/packages/borgmatic) about what check() should do.
> The upstream borgmatic project uses tox to execute its tests. tox creates
> an isolated python virtualenv with the correct dependency versions and
> executes tests in there.

Don't use tox. We are checking of the dependecies we correct as well. Installing
deps with tox from pypi defeats this purpose.

> The original maintainer thinks check() should not use tox so that tests can
> be run against the system installed dependencies. But this is not so easy
> to do, an attempt was made by installing the python package into an
> isolated directory just for tests, but even then it seems to conflict with
> an existing borgmatic installation.

The original maintainer is correct. This is also why you should be running clean
chroots. But if it's conflicting you are doing something wrong

> Another way of seeing things is that check() should just run tests the way
> it is intended by upstream, it is for testing the build artifacts are
> correct, not for testing it will run correctly on the system where it is
> built. By this logic check() should just run tox, and correct dependency
> versions can be enforced by using version ranges in "depends".

Using tox is for convenience, but if tox is using nose or pytest then use that.
Don't use version ranges to check if dependencies are correct, run the tests.

We shouldn't download anything after dependencies and sources have been fetched.

-- 
Morten Linderud
PGP: 9C02FF419FECBE16
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.archlinux.org/pipermail/aur-general/attachments/20190102/1ab0adb5/attachment.asc>


More information about the aur-general mailing list