Commit 78a42116 authored by Daniel Stone's avatar Daniel Stone Committed by Pekka Paalanen

tests: Reshuffle IVI layout tests

Rename the IVI tests to be more consistent with the others, and invert
the naming of plugin/client to make it slightly more clear what's going
to happen. Handle the renaming by using wet_get_binary_path to rewrite
the local binaries.

As a side-effect, weston.ini ivi-shell-user-interface no longer needs to
be given as an absolute path.
Signed-off-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>

v2:

Call ivi-layout.ivi as ivi-layout-test-client.ivi to keep the same name
in both the file and the lookup, so that the module map does not need to
change the name.

Update code comments to reflect the new names.

Rename ivi_layout-test-plugin.c to ivi-layout-test-plugin.c.
Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
Reviewed-by: eucan's avatarEmre Ucan <eucan@de.adit-jv.com>
Reviewed-by: default avatarEmil Velikov <emil.velikov@collabora.com>
parent f5c96467
Pipeline #1568 passed with stage
in 4 minutes and 3 seconds
......@@ -1477,13 +1477,13 @@ ivi_layout_internal_test_la_LIBADD = $(test_module_libadd)
ivi_layout_internal_test_la_LDFLAGS = $(test_module_ldflags)
ivi_layout_internal_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
ivi_layout_internal_test_la_SOURCES = \
tests/ivi_layout-internal-test.c
tests/ivi-layout-internal-test.c
ivi_layout_test_la_LIBADD = $(test_module_libadd)
ivi_layout_test_la_LDFLAGS = $(test_module_ldflags)
ivi_layout_test_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
ivi_layout_test_la_SOURCES = \
tests/ivi_layout-test-plugin.c \
tests/ivi-layout-test-plugin.c \
tests/ivi-test.h \
shared/helpers.h
nodist_ivi_layout_test_la_SOURCES = \
......@@ -1500,17 +1500,17 @@ nodist_ivi_shell_app_weston_SOURCES = \
ivi_shell_app_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
ivi_shell_app_weston_LDADD = libtest-client.la
noinst_PROGRAMS += ivi-layout.ivi
noinst_PROGRAMS += ivi-layout-test-client.ivi
ivi_layout_ivi_SOURCES = \
tests/ivi_layout-test.c \
ivi_layout_test_client_ivi_SOURCES = \
tests/ivi-layout-test-client.c \
tests/ivi-test.h \
shared/helpers.h
nodist_ivi_layout_ivi_SOURCES = \
nodist_ivi_layout_test_client_ivi_SOURCES = \
protocol/ivi-application-protocol.c \
protocol/ivi-application-client-protocol.h
ivi_layout_ivi_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
ivi_layout_ivi_LDADD = libtest-client.la
ivi_layout_test_client_ivi_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
ivi_layout_test_client_ivi_LDADD = libtest-client.la
endif
if BUILD_SETBACKLIGHT
......
......@@ -676,6 +676,7 @@ hmi_server_setting_create(struct weston_compositor *ec)
struct hmi_server_setting *setting = MEM_ALLOC(sizeof(*setting));
struct weston_config *config = wet_get_config(ec);
struct weston_config_section *shell_section = NULL;
char *ivi_ui_config;
shell_section = weston_config_get_section(config, "ivi-shell",
NULL, NULL);
......@@ -704,7 +705,16 @@ hmi_server_setting_create(struct weston_compositor *ec)
weston_config_section_get_string(shell_section,
"ivi-shell-user-interface",
&setting->ivi_homescreen, NULL);
&ivi_ui_config, NULL);
if (ivi_ui_config && ivi_ui_config[0] != '/') {
setting->ivi_homescreen = wet_get_binary_path(ivi_ui_config);
if (setting->ivi_homescreen)
free(ivi_ui_config);
else
setting->ivi_homescreen = ivi_ui_config;
} else {
setting->ivi_homescreen = ivi_ui_config;
}
return setting;
}
......
[core]
shell=@plugin_prefix@ivi-shell.so
modules=@plugin_prefix@hmi-controller.so
shell=ivi-shell.so
modules=hmi-controller.so
[ivi-shell]
ivi-shell-user-interface=@abs_top_builddir@/weston-ivi-shell-user-interface
ivi-shell-user-interface=weston-ivi-shell-user-interface
#developermode=true
......@@ -38,7 +38,7 @@ workspace-background-color=0x99000000
workspace-background-id=2001
[input-method]
path=@libexecdir@/weston-keyboard
path=weston-keyboard
[ivi-launcher]
workspace-id=0
......
......@@ -175,18 +175,18 @@ ivi_window_destroy(struct ivi_window *wnd)
/******************************** tests ********************************/
/*
* This is a test program, launched by ivi_layout-test-plugin.c. Each TEST()
* This is a test program, launched by ivi-layout-test-plugin.c. Each TEST()
* is forked and exec'd as usual with the weston-test-runner framework.
*
* These tests make use of weston_test_runner global interface exposed by
* ivi_layout-test-plugin.c. This allows these tests to trigger compositor-side
* ivi-layout-test-plugin.c. This allows these tests to trigger compositor-side
* checks.
*
* See ivi_layout-test-plugin.c for further details.
* See ivi-layout-test-plugin.c for further details.
*/
/**
* RUNNER_TEST() names are defined in ivi_layout-test-plugin.c.
* RUNNER_TEST() names are defined in ivi-layout-test-plugin.c.
* Each RUNNER_TEST name listed here uses the same simple initial client setup.
*/
const char * const basic_test_names[] = {
......
......@@ -237,7 +237,8 @@ wet_module_init(struct weston_compositor *compositor,
if (!launcher)
return -1;
if (weston_module_path_from_env("ivi-layout.ivi", launcher->exe,
if (weston_module_path_from_env("ivi-layout-test-client.ivi",
launcher->exe,
sizeof launcher->exe) == 0) {
weston_log("test setup failure: WESTON_MODULE_MAP not set\n");
return -1;
......@@ -300,11 +301,12 @@ runner_assert_fail(const char *cond, const char *file, int line,
* this module specially by loading it in ivi-shell.
*
* Once Weston init completes, this module launches one test program:
* ivi-layout.ivi (ivi_layout-test.c). That program uses the weston-test-runner
* framework to fork and exec each TEST() in ivi_layout-test.c with a fresh
* ivi-layout-test-client.ivi (ivi-layout-test-client.c).
* That program uses the weston-test-runner
* framework to fork and exec each TEST() in ivi-layout-test-client.c with a fresh
* connection to the single compositor instance.
*
* Each TEST() in ivi_layout-test.c will bind to weston_test_runner global
* Each TEST() in ivi-layout-test-client.c will bind to weston_test_runner global
* interface. A TEST() will set up the client state, and issue
* weston_test_runner.run request to execute the compositor-side of the test.
*
......@@ -317,7 +319,7 @@ runner_assert_fail(const char *cond, const char *file, int line,
* runner_assert_or_return(). This module catches the test program exit
* code and passes it out of Weston to the test harness.
*
* A single TEST() in ivi_layout-test.c may use multiple RUNNER_TEST()s to
* A single TEST() in ivi-layout-test-client.c may use multiple RUNNER_TEST()s to
* achieve multiple test points over a client action sequence.
*/
......
......@@ -34,7 +34,7 @@ for mod in cms-colord cms-static desktop-shell drm-backend fbdev-backend \
done
for exe in weston-desktop-shell weston-keyboard weston-screenshooter \
weston-simple-im ivi-layout.ivi; do \
weston-simple-im ivi-layout-test-client.ivi; do \
WESTON_MODULE_MAP="${WESTON_MODULE_MAP}${exe}=${abs_builddir}/${exe};"
done
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment