diff options
author | Yao Zhao <yao.zhao@windriver.com> | 2012-07-17 16:46:30 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-19 17:18:11 +0100 |
commit | d1c9fab93b9beeaffa428c40251349712e10649d (patch) | |
tree | eb55e1774bb673ac7ff6dbb0a45c4e1fe73718cd /meta | |
parent | df64377dd5fd8b2c336a9aa8c423184ed034148e (diff) | |
download | poky-d1c9fab93b9beeaffa428c40251349712e10649d.tar.gz |
dbus-glib: add support for install regression tests
dbus-glib.inc: default turn off unit test as libdbus-glib-1.so.2.2.2 will
have unit test code if DBUS_BUILD_TESTS enabled. User can turn it on with
PACKAGECONFIG_pn-dbus-glib = "tests" in local.conf or
PACKAGECONFIG ??= "tests" in recipe itself.
test-install-makefile.patch: install unit tests for test purpose
Add tests and tests-dbg package.
(From OE-Core rev: 9acc464905f8106c2828e1b7bb6ce9f9be810302)
Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-core/dbus/dbus-glib-0.98/test-install-makefile.patch | 48 | ||||
-rw-r--r-- | meta/recipes-core/dbus/dbus-glib.inc | 14 |
2 files changed, 61 insertions, 1 deletions
diff --git a/meta/recipes-core/dbus/dbus-glib-0.98/test-install-makefile.patch b/meta/recipes-core/dbus/dbus-glib-0.98/test-install-makefile.patch new file mode 100644 index 0000000000..2e8e178bb7 --- /dev/null +++ b/meta/recipes-core/dbus/dbus-glib-0.98/test-install-makefile.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | Change Makefile.am to install regression tests for test package purpose. | ||
2 | |||
3 | Upstream-Status: Inappropriate [test not install is for purpose from upstream] | ||
4 | |||
5 | Signed-off-by: Yao Zhao <yao.zhao@windriver.com> | ||
6 | |||
7 | diff --git a/test/Makefile.am b/test/Makefile.am | ||
8 | index 7ba11a8..249f0e7 100644 | ||
9 | --- a/test/Makefile.am | ||
10 | +++ b/test/Makefile.am | ||
11 | @@ -13,7 +13,8 @@ else | ||
12 | TEST_BINARIES= | ||
13 | endif | ||
14 | |||
15 | -noinst_PROGRAMS= $(TEST_BINARIES) | ||
16 | +testdir = $(datadir)/@PACKAGE@/tests | ||
17 | +test_PROGRAMS= $(TEST_BINARIES) | ||
18 | |||
19 | test_service_SOURCES= \ | ||
20 | test-service.c | ||
21 | diff --git a/test/interfaces/Makefile.am b/test/interfaces/Makefile.am | ||
22 | index 3cb2c39..e6de67d 100644 | ||
23 | --- a/test/interfaces/Makefile.am | ||
24 | +++ b/test/interfaces/Makefile.am | ||
25 | @@ -39,7 +39,8 @@ if DBUS_BUILD_TESTS | ||
26 | |||
27 | ## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we | ||
28 | ## build even when not doing "make check" | ||
29 | -noinst_PROGRAMS = test-service test-client | ||
30 | +testdir = $(datadir)/@PACKAGE@/tests/interfaces | ||
31 | +test_PROGRAMS = test-service test-client | ||
32 | |||
33 | test_service_SOURCES = \ | ||
34 | test-interfaces.c \ | ||
35 | diff --git a/test/core/Makefile.am b/test/core/Makefile.am | ||
36 | index ef6cb26..9786c3a 100644 | ||
37 | --- a/test/core/Makefile.am | ||
38 | +++ b/test/core/Makefile.am | ||
39 | @@ -46,7 +46,8 @@ endif | ||
40 | |||
41 | ## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we | ||
42 | ## build even when not doing "make check" | ||
43 | -noinst_PROGRAMS = \ | ||
44 | +testdir = $(datadir)/@PACKAGE@/tests/core | ||
45 | +test_PROGRAMS = \ | ||
46 | test-dbus-glib \ | ||
47 | test-service-glib \ | ||
48 | $(THREAD_APPS) \ | ||
diff --git a/meta/recipes-core/dbus/dbus-glib.inc b/meta/recipes-core/dbus/dbus-glib.inc index f554ce82b1..a8e6d420f7 100644 --- a/meta/recipes-core/dbus/dbus-glib.inc +++ b/meta/recipes-core/dbus/dbus-glib.inc | |||
@@ -13,15 +13,21 @@ DEPENDS_virtclass-native = "glib-2.0-native dbus-native" | |||
13 | SRC_URI = "http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-${PV}.tar.gz \ | 13 | SRC_URI = "http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-${PV}.tar.gz \ |
14 | file://no-examples.patch \ | 14 | file://no-examples.patch \ |
15 | file://test-service-glib-include-glib-only.patch \ | 15 | file://test-service-glib-include-glib-only.patch \ |
16 | file://test-install-makefile.patch \ | ||
16 | " | 17 | " |
17 | 18 | ||
18 | inherit autotools pkgconfig gettext | 19 | inherit autotools pkgconfig gettext |
19 | 20 | ||
21 | #default disable regression tests, some unit test code in non testing code | ||
22 | #PACKAGECONFIG_pn-${PN} = "tests" enable regression tests local.conf | ||
23 | PACKAGECONFIG ??= "" | ||
24 | PACKAGECONFIG[tests] = "--enable-tests,,," | ||
25 | |||
20 | EXTRA_OECONF = "--with-introspect-xml=${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml \ | 26 | EXTRA_OECONF = "--with-introspect-xml=${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml \ |
21 | --with-dbus-binding-tool=${STAGING_BINDIR_NATIVE}/dbus-binding-tool" | 27 | --with-dbus-binding-tool=${STAGING_BINDIR_NATIVE}/dbus-binding-tool" |
22 | EXTRA_OECONF_virtclass-native = "--with-introspect-xml=${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml" | 28 | EXTRA_OECONF_virtclass-native = "--with-introspect-xml=${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml" |
23 | 29 | ||
24 | PACKAGES += "${PN}-bash-completion" | 30 | PACKAGES += "${PN}-bash-completion ${PN}-tests-dbg ${PN}-tests" |
25 | 31 | ||
26 | FILES_${PN} = "${libdir}/lib*${SOLIBS}" | 32 | FILES_${PN} = "${libdir}/lib*${SOLIBS}" |
27 | FILES_${PN}-bash-completion = "${sysconfdir}/bash_completion.d/dbus-bash-completion.sh \ | 33 | FILES_${PN}-bash-completion = "${sysconfdir}/bash_completion.d/dbus-bash-completion.sh \ |
@@ -29,4 +35,10 @@ FILES_${PN}-bash-completion = "${sysconfdir}/bash_completion.d/dbus-bash-complet | |||
29 | FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool" | 35 | FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool" |
30 | FILES_${PN}-dev += "${bindir}/dbus-binding-tool" | 36 | FILES_${PN}-dev += "${bindir}/dbus-binding-tool" |
31 | 37 | ||
38 | RDEPENDS_${PN}-tests += "dbus-x11" | ||
39 | FILES_${PN}-tests = "${datadir}/${PN}/tests" | ||
40 | FILES_${PN}-tests-dbg = "${datadir}/${PN}/tests/.debug/* \ | ||
41 | ${datadir}/${PN}/tests/core/.debug/* \ | ||
42 | ${datadir}/${PN}/tests/interfaces/.debug/*" | ||
43 | |||
32 | BBCLASSEXTEND = "native" | 44 | BBCLASSEXTEND = "native" |