Re: [openstack-dev] How to skip certain unit tests?
On Wed, Oct 30, 2013 at 7:02 PM, Vijay B os.v...@gmail.com wrote: Hi, How can we skip certain unit tests when running run_tests.sh? I'm looking at the Openstack unit test page If it's not too late you may skip tests with testr/run_tests.sh. List all tests using testr store in a file, exclude the tests and feed the file that has tests to execute to run_tests.sh script. Something in these lines, assuming you use venv ... . .venv/bin/activate testr list-tests | egrep -v 'exclude_test1|exclude_test2' execute-tests deactivate ./run_tests.sh -- --load-list=execute-tests -- Regards, Bhuvan Arumugam www.livecipher.com ___ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] How to skip certain unit tests?
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 robe...@robertcollins.netwrote: On 31 October 2013 15:20, John Griffith john.griff...@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 rbtcoll...@hp.com Distinguished Technologist HP Converged Cloud ___ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev ___ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
[openstack-dev] How to skip certain unit tests?
Hi, How can we skip certain unit tests when running run_tests.sh? I'm looking at the Openstack unit test page at http://docs.openstack.org/developer/nova/devref/unit_tests.html but I cannot find info on how to do this. Any idea if there already is a way to do this? If not, does the community think it would be helpful to have such a facility? I think it would help to have this if certain tests are broken. Of course, tests should never be broken and should be fixed right away, but at certain times it may not be possible to wait for the tests to be fixed, especially if there is an external dependency, and we may want to be able to customize automated builds temporarily until the broken tests are fixed. Regards, Vijay ___ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] How to skip certain unit tests?
On Wed, Oct 30, 2013 at 8:02 PM, Vijay B os.v...@gmail.com wrote: Hi, How can we skip certain unit tests when running run_tests.sh? I'm looking at the Openstack unit test page at http://docs.openstack.org/developer/nova/devref/unit_tests.html but I cannot find info on how to do this. Any idea if there already is a way to do this? If not, does the community think it would be helpful to have such a facility? I think it would help to have this if certain tests are broken. Of course, tests should never be broken and should be fixed right away, but at certain times it may not be possible to wait for the tests to be fixed, especially if there is an external dependency, and we may want to be able to customize automated builds temporarily until the broken tests are fixed. Regards, Vijay ___ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev 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 Hope that helps. John ___ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] How to skip certain unit tests?
On 31 October 2013 15:20, John Griffith john.griff...@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 rbtcoll...@hp.com Distinguished Technologist HP Converged Cloud ___ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev