[openstack-dev] [Network] The destiny of run_test.sh

Joe Gordon jogo at cloudscaling.com
Wed May 1 21:22:18 UTC 2013


On Wed, May 1, 2013 at 12:06 PM, Russell Bryant <rbryant at redhat.com> wrote:

> On 04/30/2013 08:11 PM, Dan Smith wrote:
> >> However, it seems there are a few arguments for keeping run_test.sh
> >> alive.
> >
> > Personally, I think it is important for all the projects to have an
> > easy test runner script in the root. That script should run the tests
> > in the configuration we expect to work, whatever that may be. If all it
> > does is run tox, then that's fine, but I think it should be there. I
> > think it's also important for that script to have the style checks
> > available as well ("./run_tests.sh -p" does this for me right now).
> >
>
> Seems like we could do a tox wrapper, if that's actually helpful ...
> seems like just a README.tests could serve the same purpose, though.
>

++


>
> Install tox:
>
>     $ pip-python install tox
>
> Run unit tests:
>
>     $ tox -e py27
>
> Run style checks:
>
>     $ tox -e pep8
>
> Run everything:
>
>     $ tox
>
> Note that running everything will also try to run the tests for the py26
> environment.  If you don't have a Python 2.6 interpreter available, this
> part will fail, but the rest will still run.
>
> >> issues such as slowness because of sdist can be addressed.
> >
> > I'd love to know what we can do in this regard (at least for nova).
> > Running a single test with tox takes a lot longer than it should just
> > for the setup process :)
>
> I believe this has been addressed.  The ChangeLog generation used to
> generate diffstat for all commits, IIRC.  It was recently changed to not
> do that anymore and that drastically sped up this part of the process.
>
> One other thing that run_tests.sh can do is run tests without a
> virtualenv at all.  I'm not sure how to do that with tox.  I never use
> it, but I suspect it's useful for some, such as testing compatibility
> with the versions of things included in a given distro.
>

AFAIK this can be done by running the commands from inside tox.ini

    python tools/patch_tox_venv.py
    python setup.py testr --slowest --testr-args='{posargs}'



>
> --
> Russell Bryant
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130501/bd6d4ff7/attachment.html>


More information about the OpenStack-dev mailing list