[openstack-dev] [nova] fastest way to run individual tests ?

Daniel P. Berrange berrange at redhat.com
Thu Jun 12 11:17:33 UTC 2014


On Thu, Jun 12, 2014 at 07:07:37AM -0400, Sean Dague wrote:
> On 06/12/2014 06:59 AM, Daniel P. Berrange wrote:
> > Does anyone have any tip on how to actually run individual tests in an
> > efficient manner. ie something that adds no more than 1 second penalty
> > over & above the time to run the test itself. NB, assume that i've primed
> > the virtual env with all prerequisite deps already.
> > 
> 
> The overhead is in the fact that we have to discover the world, then
> throw out the world.
> 
> You can actually run an individual test via invoking the testtools.run
> directly:
> 
> > python -m testtools.run nova.tests.test_versions
> 
> (Also, when testr explodes because of an import error this is about the
> only way to debug what's going on).

Most excellent, thankyou. I knew someone must know a way to do it :-)

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|



More information about the OpenStack-dev mailing list