[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Any example to use tox framework



On Mar 10, 2015, at 03:09 PM, Andreas Tille wrote:

>and yes, I was formerly doing `/bin/bash run_all_unit_tests.cmd` in
>debian rules manually.  So you want to tell me that ignoring python-tox
>and just do
>
>override_dh_auto_test:
>	cd ruffus/test && \
>	sh ./run_all_unit_tests.cmd && \
>	sh ./run_all_unit_tests3.cmd
>
>is the best idea?  I did so before upstream told me that tox is
>supported and I had the idea that it might be a good idea to use
>existing frameworks.

Hi Andreas,

I wish I had more time to dig into the details, but for projects that I've
packaged where upstream used tox to drive its test suite (a good thing! :),
I've had more success *not* using tox in d/rules.  I haven't had time to
figure out whether the problems are related to pybuild, the build system
(sbuild, pbuilder), or something else.

The other thing to consider is that sometimes the default tox.ini might run
*too* much stuff.  For example, the default environment might include tests
under multiple Python versions, with coverage and without, with alternative
database engines, etc.  I filed this related tox bug:

https://bitbucket.org/hpk42/tox/issue/223/please-add-a-tox-default_envlist-setting

So there may be other reasons why you don't want to just run tox in d/rules,
or if you do, to narrow the environments that you run.

But do experiment; it would be nice to have a good body of experience with
using tox in d/rules.  Sorry I can't help more with that right now.

Cheers,
-Barry


Reply to: