[openstack-dev] Build-time unit tests failing when building glance 2013.2.b1

Mark Washenberger mark.washenberger at markwash.net
Sat Jun 29 22:15:40 UTC 2013


Munging together some replies:


On Sat, Jun 29, 2013 at 12:26 PM, Monty Taylor <mordred at inaugust.com> wrote:

> On 06/29/2013 02:14 PM, Thomas Goirand wrote:
> > On 06/30/2013 12:16 AM, Mark Washenberger wrote:
> >> Hi Thomas,
> >>
> >> We switched to using entrypoints for creating our binaries.
> >
> > Can you explain this a bit more?
>

Very specifically,
https://github.com/openstack/glance/blob/master/setup.py#L55

This means rather than keeping a /bin directory in our project, we're
asking setup.py to generate scripts and install them in an appropriate
location when setup.py install is run.


> >
> >> Unfortunately, this means you need to have the glance version
> >> "installed" in some sense in your path when you want to run those tests.
> >> This felt like a no-no when we made the change, but it worked fine
> >> without any changes to our normal tox and run_tests.sh (with virtualenv)
> >> so it made it through. Please let me know if this is really hard to deal
> >> with on your side; I can imagine a few other possible fixes we might
> pursue.
> >>
> >> Thanks
> >
> > Using virtualenv is indeed not an option on the packaging side. Having
> > glance build-depends: on itself is also not an option.
> >
> > What can I do?
>

Just for future reference for me, what kinds of dependencies can you
establish for your "test" step in maintaining your package repos? Do you
pretty much only have access to a source checkout / tarball? And is the
"test" step completely contained within the "build" step?


>
> I believe we should fix the unittests to not shell out to glance-manage
> in that manner. One of the nice things about moving the code from bin/
> to glance.cmd is that it's available inside of the source tree for
> unittests! :) What we want to do is call the glance.cmd.manage:main()
> function directly. So, for instance, in:
>
> glance/tests/functional/__init__.py
> and
> glance/tests/functional/test_glance_manage.py
>
> We can call the function itself, rather than the shell wrapper.
>
> I'll make a patch. Are you seeing problems with anything other than
> glance-manage?
>

Thanks Monty! This was exactly what I had in mind as an alternative
approach. I believe glance-manage is the only binary where glance had such
an install dependency for testing--but I can't answer for Thomas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130629/4a392d41/attachment.html>


More information about the OpenStack-dev mailing list