Problem with adding our plugin to execute run_tests.sh

Asked by kedar kulkarni

Hi,
I want to write unit test cases and test them using run_tests script.
We have installed openstack with devstack.
We are able to run openvswitch tests using run_tests.sh.
This was the command we used.
./run_tests.sh -N neutron.tests.unit.openvswitch

Also, we are able to run brocade and plumgrid test cases using the similar command as above.

Now, we have added our plugin code at neutron/plugins/.
and unit test code at neutron/tests/unit/.

But when tried the similar command for our plugin, we are facing issues.

import errors0neutron.tests.unit.my_plugin.test_my_plugin\xc9\xf1\xdaj', stderr=None
error: testr failed (3)
running=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_LOG_CAPTURE=1 ${PYTHON:-python} -m subunit.run discover -t ./ neutron/tests --list

I have few doubts,

when i added my test code, the tests for other plugins are also failing.
When I run "python setup.py build" it is not picking my plugin. And in neutron.egg-info/SOURCES.txt my plugin files list is not there.

Any help is appreciated.

Question information

Language:
English Edit question
Status:
Answered
For:
neutron Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Sumit Naiksatam (snaiksat) said :
#1

Is there any reason why you would not want to use tox?

Revision history for this message
yong sheng gong (gongysh) said :
#2

remove your test codes and try to write a very simple test case.

Can you help with this problem?

Provide an answer of your own, or ask kedar kulkarni for more information if necessary.

To post a message you must log in.