On Thu, Feb 27, 2014 at 11:39 AM, Collins, Sean <[email protected]> wrote: > Shixiong Shang and I ran into this problem with Tox today while we were > pair programming, and I've also seen similar barfs on my DevStack lab > boxes - it's quite a mess. Frankly I've moved to using nosetests as a > workaround, and have added it to the developer docs. > > We really do need to figure out how to make Tox and Testr give more > useful failure output - it's so huge it makes my iTerm2 window lock up > when I try and do an incremental search on the output. > > Help from a Testr / Tox guru would be appreciated. > > -- > Sean M. Collins > _______________________________________________ > OpenStack-dev mailing list > [email protected] > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
These failures are a result of testr or discover (depending on the step in the test process, discovery happens first) running into python import failures. In the example above it looks like neutron.tests.unit. linuxbridge.test_lb_neutron_agent failed to import. You can spin up a python interpreter and try importing that to debug (note that is what you tried to do but I believe errors4 is part of the error message and not the thing that couldn't be imported). Flake8 may also catch the problem. Lifeless has laid the groundwork to fix this upstream in testtools [0], but I don't think the corresponding testrepository improvements have been released yet. You can however install testrepository from source [1] and see if that solves your problem. Without seeing the code in question it is really hard to debug any further. If nosetests does work that would indicate a possible intertest dependency that nose resolves by running tests in a particular order which is different than the order used by testr. Finally, when using the python executable from a virtualenv you don't want to be in the virtualenv's bin dir. To do a proper import test you want to be in the root dir of the repository `cd ~/github/neutron` the either activate the virtualenv and run python or skip activation and do `.tox/py27/bin/python` to run the virtualenv's python binary. [0] https://github.com/testing-cabal/testtools/commit/6da4893939c6fd2d732bb20a4ac50db2fe639132 [1] https://launchpad.net/testrepository/ Hope this helps, Clark _______________________________________________ OpenStack-dev mailing list [email protected] http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
