[PATCH weston] compositor: Respect WESTON_BUILD_DIR env var in weston_load_module

Pekka Paalanen ppaalanen at gmail.com
Sun Jun 7 23:26:56 PDT 2015

On Fri, 05 Jun 2015 12:15:12 -0700
"Jon A. Cruz" <jonc at osg.samsung.com> wrote:

> On 06/05/2015 08:07 AM, Derek Foreman wrote:

> >  WL_EXPORT void *
> >  weston_load_module(const char *name, const char *entrypoint)
> >  {
> > +	const char *builddir = getenv("WESTON_BUILD_DIR");
> There's something 'off' here about the environment variable. However
> it's not really about this patch but the variable in general. I'll try
> to pinpoint what's bothering me in the overall use and follow up. Might
> just be choice of name and reusing a term from a slightly different
> context...


sure, this is a variable specific to tests and internal to Weston, so
you are free to invent a better replacement.

The idea is to avoid possibly installed Weston
plugins/modules/executables from being loaded, and ensure we are
running with the binaries just compiled for the test, even if the same
named would be present in the system. If the build somehow forgets to
produce a binary, and we try to load it in a test, it should obviously
fail, too.

Examples of these binaries are:
- backends: x11-backend.so, drm-backend.so, etc.
- gl-renderer.so
- shells: fullscreen-shell.so, ivi-shell.so, etc.
- shell sub-plugins: hmi-controller.so
- other plugins: cms-colord.so, etc.
- helper clients: weston-desktop-shell,
  weston-ivi-shell-user-interface, weston-screenshooter, etc.


More information about the wayland-devel mailing list