[openstack-dev] The future of run_tests.sh

Monty Taylor mordred at inaugust.com
Tue Jun 18 18:44:15 UTC 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



On 06/18/2013 08:44 AM, Julien Danjou wrote:
> FWIW, I think we never really had a run_tests.sh in Ceilometer
> like other projects might have, and we don't have one anymore for
> weeks, and that never looked like a problem.
> 
> We just rely on tox and on a good working listing in
> requirements.txt and test-requirements.txt, so you can build a venv
> yourself if you'd like.

A couple of followups to things in this thread so far:

- - Running tests consistently both in and out of virtualenv.

Super important. Part of the problem is that setuptools "test" command
is a broken pile of garbage. So we have a patch coming to pbr that
will sort that out - and at least as a next step, tox and run_tests.sh
can both run python setup.py test and it will work both in and out of
a venv, regardless of whether the repo uses nose or testr.

- - Individual tests

nose and tox and testr and run_tests.sh all support running individual
tests just fine. The invocation is slightly different for each. For me
testr is hte friendliest because it defaults to regexes - so "testr
run test_foo" will happily run
nova.tests.integration.deep_directory.foo.TestFoo.test_foo. But - all
four mechanisms work here fine.

- - pbr

Dropping in to a debugger while running via testr is currently
problematic, but is currently on the table to be sorted. In the
meantime, the workaround is to run testtools.run directly, which
run_tests.sh does for you if you specify a single test. I think this
is probably the single greatest current reason to keep run_tests.sh at
the moment - because as much as you can learn the cantrips around
doing it, it's not a good UI.

- - nova vs. testr

In general, things are moving towards testr being the default. I don't
think there will be anybody cutting off people's hands for using nose,
but I strongly recommend taking a second to learn testr a bit. It's
got some great features and is built on top of a completely machine
parsable test result streaming protocol, which means we can do some
pretty cool stuff with it.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEARECAAYFAlHAqn4ACgkQ2Jv7/VK1RgGZ9gCdHe8AhG8uQi7nkBz1UbZHUjvJ
KskAoKddVUPBZnXAtzNpBiwazRid0gu7
=eGE3
-----END PGP SIGNATURE-----



More information about the OpenStack-dev mailing list