tests: Don't rely on build directory layout
authorDaniel Stone <daniels@collabora.com>
Thu, 24 Nov 2016 20:45:45 +0000 (20:45 +0000)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Wed, 20 Jun 2018 11:36:52 +0000 (14:36 +0300)
commite03c111e4e631817e82c5172396859968a736b2d
tree7f262f629dcd597d8145ec394fc2b432cbd6367f
parent002f0c56e0c9ab62ea008f110de46ed9c1dd29b9
tests: Don't rely on build directory layout

Rather than having a hardcoded dependency on the build-directory layout,
use an explicit module-map environment variable, which rewrites requests
for modules and helper/libexec binaries to specific paths.

Pekka: This will help with migration to Meson where setting up the paths
according to autotools would be painful and unnecessary.

Emre: This should also help setting up the test suite after a
cross-compile.

Pekka: A caveat here is that this patch makes it slightly easier to load
external backends by abusing the module map. External backends are
specifically not supported in libweston.

Signed-off-by: Daniel Stone <daniels@collabora.com>
v2:

Fixed ivi_layout-test-plugin.c:wet_module_init().
Do not change the lookup name of ivi-layout.ivi.

Improved documentation of weston_module_path_from_env() and made it cope
with map strings that a) do not end with a semicolon, and b) have
multiple consecutive semicolons.

Let WESTON_MODULE_MAP be printed into the test log so that it is easier
to run tests manually.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emre Ucan <eucan@de.adit-jv.com>
Suggested by Emil: Use a variable for strlen(name).

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
compositor/main.c
compositor/text-backend.c
compositor/weston-screenshooter.c
compositor/weston.h
desktop-shell/shell.c
libweston/compositor.c
libweston/compositor.h
tests/ivi_layout-test-plugin.c
tests/weston-tests-env