[PATCH weston 5/9] build: generate weston-ivi.ini for tests

Pekka Paalanen ppaalanen at gmail.com
Mon Mar 30 02:20:08 PDT 2015


From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>

The ivi-shell / hmi-controller cannot run without a properly populated
config file. Generate a config file especially for tests, which includes
paths to the build dirs.

The generated file will be used by following patches adding ivi-shell
tests.

Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
---
 .gitignore              |  2 ++
 Makefile.am             | 20 ++++++++++++++++++--
 ivi-shell/weston.ini.in |  4 ++--
 3 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/.gitignore b/.gitignore
index aa24f9a..5be35ce 100644
--- a/.gitignore
+++ b/.gitignore
@@ -95,3 +95,5 @@ setbacklight
 weston.1
 weston-drm.7
 weston.ini.5
+
+/tests/weston-ivi.ini
diff --git a/Makefile.am b/Makefile.am
index 863adb2..fce82f1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -24,6 +24,15 @@ ivi-shell/weston.ini : $(srcdir)/ivi-shell/weston.ini.in
 		-e 's|@bindir[@]|$(bindir)|g' \
 		-e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
 		-e 's|@libexecdir[@]|$(libexecdir)|g' \
+		-e 's|@plugin_prefix[@]||g' \
+		$< > $@
+
+tests/weston-ivi.ini : $(srcdir)/ivi-shell/weston.ini.in
+	$(AM_V_GEN)$(SED) \
+		-e 's|@bindir[@]|$(bindir)|g' \
+		-e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
+		-e 's|@libexecdir[@]|$(libexecdir)|g' \
+		-e 's|@plugin_prefix[@]|$(abs_top_builddir)/.libs/|g' \
 		$< > $@
 
 all-local : weston.ini ivi-shell/weston.ini
@@ -42,7 +51,10 @@ AM_CPPFLAGS = 					\
 	-DLIBEXECDIR='"$(libexecdir)"'		\
 	-DBINDIR='"$(bindir)"'
 
-CLEANFILES = weston.ini ivi-shell/weston.ini $(BUILT_SOURCES)
+CLEANFILES = weston.ini				\
+	ivi-shell/weston.ini			\
+	tests/weston-ivi.ini			\
+	$(BUILT_SOURCES)
 
 bin_PROGRAMS += weston
 
@@ -920,7 +932,7 @@ libshared_cairo_la_SOURCES =			\
 # tests subdirectory
 #
 
-TESTS = $(shared_tests) $(module_tests) $(weston_tests)
+TESTS = $(shared_tests) $(module_tests) $(weston_tests) $(ivi_tests)
 
 shared_tests =					\
 	config-parser.test			\
@@ -940,6 +952,9 @@ weston_tests =					\
 	roles.weston				\
 	subsurface.weston
 
+ivi_tests =
+
+$(ivi_tests) : $(builddir)/tests/weston-ivi.ini
 
 AM_TESTS_ENVIRONMENT = \
 	abs_builddir='$(abs_builddir)'; export abs_builddir;
@@ -964,6 +979,7 @@ noinst_PROGRAMS +=			\
 	$(setbacklight)			\
 	$(shared_tests)			\
 	$(weston_tests)			\
+	$(ivi_tests)			\
 	matrix-test
 
 test_module_ldflags = \
diff --git a/ivi-shell/weston.ini.in b/ivi-shell/weston.ini.in
index e05e8da..06af7e2 100644
--- a/ivi-shell/weston.ini.in
+++ b/ivi-shell/weston.ini.in
@@ -1,8 +1,8 @@
 [core]
-shell=ivi-shell.so
+shell=@plugin_prefix at ivi-shell.so
 
 [ivi-shell]
-ivi-module=hmi-controller.so
+ivi-module=@plugin_prefix at hmi-controller.so
 ivi-shell-user-interface=@abs_top_builddir@/weston-ivi-shell-user-interface
 
 #developermode=true
-- 
2.0.5



More information about the wayland-devel mailing list