[openstack-dev] How to skip certain unit tests?

Vijay B os.vbvs at gmail.com
Tue Nov 5 05:09:45 UTC 2013


Hi John, Rob,

Thanks for the pointers - I used skipTest() within the specific tests I
wanted to skip to get over the failing ones. Just an fyi, I'm working with
my own internal quantum staging gate on an older release, so I haven't
checked on the latest neutron master yet. In case I do find failures there,
will attempt to fix them and/or let the community know.

Cheers!
Regards,
Vijay


On Wed, Oct 30, 2013 at 7:46 PM, Robert Collins
<robertc at robertcollins.net>wrote:

> On 31 October 2013 15:20, John Griffith <john.griffith at solidfire.com>
> wrote:
>
> > Hi Vijay,
> >
> > Theoretically there should never be broken tests in master, that's
> > what the gates are for and if there are they should be fixed very
> > quickly.
> >
> > Back to your question, I don't know of a way to skip from
> > run_tests.sh, but there is a skip decorator that can be added to tests
> > in the code.  You can also specify specific tests to run.  Using
> > run_tests.sh (you can also do more sophisticated things with testr or
> > tox directly) you could do something like:
> > 'run_tests.sh cinder.tests.test_volumes' or more granular:
> > 'run_tests.sh
> cinder.tests.test_volume:VolumeTestCase.test_create_delete_volume
>
> For any project that has switched to testr, it should be simple - pass
> -- <some regex> in.
>
> e.g. run_tests.sh -- (?!testnametoskip)
>
> Cheers,
> Rob
>
> --
> Robert Collins <rbtcollins at hp.com>
> Distinguished Technologist
> HP Converged Cloud
>
> _______________________________________________
> 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/20131104/9f02b99b/attachment-0001.html>


More information about the OpenStack-dev mailing list