[openstack-dev] bug 1203680 - fix requires doc
Mike Spreitzer
mspreitz at us.ibm.com
Sat Feb 22 05:21:10 UTC 2014
Sean Dague <sean at dague.net> wrote on 02/21/2014 06:09:18 PM:
> On 02/21/2014 05:28 PM, Clark Boylan wrote:
> > ...
> > I would be wary of relying on devstack to configure your unittest
> > environments. Just like it takes over the node you run it on, devstack
> > takes full ownership of the repos it clones and will do potentially
> > lossy things like `git reset --hard` when you don't expect it to. +1
> > to documenting the requirements for unittesting, not sure I would
> > include devstack in that documentation.
>
> Agreed, I never run unit tests in the devstack tree. I run them on my
> laptop or other non dedicated computers. That's why we do unit tests in
> virtual envs, they don't need a full environment.
>
> Also many of the unit tests can't be run when openstack services are
> actually running, because they try to bind to ports that openstack
> services use.
>
> It's one of the reasons I've never considered that path a priority in
> devstack.
>
> -Sean
OK, that's important news to me. I thought DevStack is the recommended
way to run unit tests; I have heard that from other developers and even
read it in something I did not write (I also wrote it in a few places
myself, thinking it was the answer). So the recommended way to run the
unit tests for a project is to git clone that project and then `tox` in
that project's directory, right?
http://docs.openstack.org/developer/nova/devref/development.environment.html
and https://github.com/openstack/horizon/blob/master/README.rst say to use
run_tests.sh. Over in Heat-land, Angus is leading a campaign to
exterminate run_tests.sh in favor of tox. Am I getting conflicting
answers because of outdated documentation, or differences between
projects, or the fact that a sea-change is in progress, or ... ?
My personal interests right now are centered on Nova and Heat, but clearly
the issues here are not limited to those two projects.
http://docs.openstack.org/developer/nova/devref/development.environment.html
has several interesting features. It tells me how to set up a development
environment in Linux, and also tells me how to set up a development
environment in MacOS X. Is the latter for real? When I followed those
instructions on my Mac and ran the unit tests I got several failures.
http://docs.openstack.org/developer/nova/devref/development.environment.html
has long fiddly instructions for setting up a development environment on
Linux; the Mac side is much simpler, leveraging the setup infrastructure
for unit testing --- which is available in Linux too! Why not give the
simple instructions for both platforms?
Is there a greased path for graduating from unit testing to
integration/system tests, or would that be done by submitting my work for
review and then cherry-picking it into a DevStack install?
I am glad to know I am not the only one who finds it odd that the fix to a
unit testing problem is to make DevStack more flexible. Why was bug
1203680 not fixed by more direct means? Is it because tox can not do the
sort of flexible system package installations that the DevStack scripting
does?
IMHO, we need to either accept the existing fix and its implications
(using DevStack to setup for unit testing) and document in all the
relevant places (which includes the DevStack documentation), or switch to
a different fix.
Regards,
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140222/a96e0fe6/attachment.html>
More information about the OpenStack-dev
mailing list