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>
This commit is contained in:
committed by
Pekka Paalanen
parent
002f0c56e0
commit
e03c111e4e
@@ -468,17 +468,12 @@ shell_configuration(struct desktop_shell *shell)
|
||||
{
|
||||
struct weston_config_section *section;
|
||||
char *s, *client;
|
||||
int ret;
|
||||
int allow_zap;
|
||||
|
||||
section = weston_config_get_section(wet_get_config(shell->compositor),
|
||||
"shell", NULL, NULL);
|
||||
ret = asprintf(&client, "%s/%s", weston_config_get_libexec_dir(),
|
||||
WESTON_SHELL_CLIENT);
|
||||
if (ret < 0)
|
||||
client = NULL;
|
||||
weston_config_section_get_string(section,
|
||||
"client", &s, client);
|
||||
client = wet_get_binary_path(WESTON_SHELL_CLIENT);
|
||||
weston_config_section_get_string(section, "client", &s, client);
|
||||
free(client);
|
||||
shell->client = s;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user