Re: [PATCH weston 4/4] tests: Reshuffle IVI layout tests

2018-06-20 Thread Pekka Paalanen
On Tue, 19 Jun 2018 18:39:09 +0100
Emil Velikov  wrote:

> On 18 June 2018 at 15:40, Pekka Paalanen  wrote:
> > From: Daniel Stone 
> >
> > 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 
> >
> > 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.
> >  
> About half of the patch is the mechanical rename - worth keeping that
> separate from the rest?

True, it would be better that way, but if you don't insist, I won't
bother, since three people with you included have already reviewed the
patch.

> Either way, patch looks spot on and is
> Reviewed-by: Emil Velikov 

Cheers,
pq


pgpw6lSbseUkd.pgp
Description: OpenPGP digital signature
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH weston 4/4] tests: Reshuffle IVI layout tests

2018-06-19 Thread Emil Velikov
On 18 June 2018 at 15:40, Pekka Paalanen  wrote:
> From: Daniel Stone 
>
> 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 
>
> 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.
>
About half of the patch is the mechanical rename - worth keeping that
separate from the rest?
Either way, patch looks spot on and is
Reviewed-by: Emil Velikov 

-Emil
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


[PATCH weston 4/4] tests: Reshuffle IVI layout tests

2018-06-18 Thread Pekka Paalanen
From: Daniel Stone 

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 

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 
---
 Makefile.am  | 16 
 ivi-shell/hmi-controller.c   | 12 +++-
 ivi-shell/weston.ini.in  |  8 
 ...layout-internal-test.c => ivi-layout-internal-test.c} |  0
 tests/{ivi_layout-test.c => ivi-layout-test-client.c}|  8 
 ...ivi_layout-test-plugin.c => ivi-layout-test-plugin.c} | 12 +++-
 tests/weston-tests-env   |  2 +-
 7 files changed, 35 insertions(+), 23 deletions(-)
 rename tests/{ivi_layout-internal-test.c => ivi-layout-internal-test.c} (100%)
 rename tests/{ivi_layout-test.c => ivi-layout-test-client.c} (97%)
 rename tests/{ivi_layout-test-plugin.c => ivi-layout-test-plugin.c} (98%)

diff --git a/Makefile.am b/Makefile.am
index d2025bc5..3bce47a1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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
diff --git a/ivi-shell/hmi-controller.c b/ivi-shell/hmi-controller.c
index 0e44df88..a0e49ba0 100644
--- a/ivi-shell/hmi-controller.c
+++ b/ivi-shell/hmi-controller.c
@@ -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",
->ivi_homescreen, NULL);
+_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;
 }
diff --git a/ivi-shell/weston.ini.in b/ivi-shell/weston.ini.in
index 3f11e1c0..a06d76ef 100644
--- a/ivi-shell/weston.ini.in
+++ b/ivi-shell/weston.ini.in
@@ -1,9 +1,9 @@
 [core]
-shell=@plugin_pre...@ivi-shell.so