From: Saul Wold <sgw@linux.intel.com>
To: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH v2] dbus-glib: add support for install regression tests
Date: Thu, 19 Jul 2012 21:07:10 -0700 [thread overview]
Message-ID: <5008D96E.30702@linux.intel.com> (raw)
In-Reply-To: <1342557990-15381-1-git-send-email-yao.zhao@windriver.com>
On 07/17/2012 01:46 PM, Yao Zhao wrote:
> 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.
>
> Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
> ---
> .../dbus-glib-0.98/test-install-makefile.patch | 48 ++++++++++++++++++++
> meta/recipes-core/dbus/dbus-glib.inc | 14 +++++-
> 2 files changed, 61 insertions(+), 1 deletion(-)
> create mode 100644 meta/recipes-core/dbus/dbus-glib-0.98/test-install-makefile.patch
>
> 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 0000000..2e8e178
> --- /dev/null
> +++ b/meta/recipes-core/dbus/dbus-glib-0.98/test-install-makefile.patch
> @@ -0,0 +1,48 @@
> +Change Makefile.am to install regression tests for test package purpose.
> +
> +Upstream-Status: Inappropriate [test not install is for purpose from upstream]
> +
> +Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
> +
> +diff --git a/test/Makefile.am b/test/Makefile.am
> +index 7ba11a8..249f0e7 100644
> +--- a/test/Makefile.am
> ++++ b/test/Makefile.am
> +@@ -13,7 +13,8 @@ else
> + TEST_BINARIES=
> + endif
> +
> +-noinst_PROGRAMS= $(TEST_BINARIES)
> ++testdir = $(datadir)/@PACKAGE@/tests
> ++test_PROGRAMS= $(TEST_BINARIES)
> +
> + test_service_SOURCES= \
> + test-service.c
> +diff --git a/test/interfaces/Makefile.am b/test/interfaces/Makefile.am
> +index 3cb2c39..e6de67d 100644
> +--- a/test/interfaces/Makefile.am
> ++++ b/test/interfaces/Makefile.am
> +@@ -39,7 +39,8 @@ if DBUS_BUILD_TESTS
> +
> + ## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we
> + ## build even when not doing "make check"
> +-noinst_PROGRAMS = test-service test-client
> ++testdir = $(datadir)/@PACKAGE@/tests/interfaces
> ++test_PROGRAMS = test-service test-client
> +
> + test_service_SOURCES = \
> + test-interfaces.c \
> +diff --git a/test/core/Makefile.am b/test/core/Makefile.am
> +index ef6cb26..9786c3a 100644
> +--- a/test/core/Makefile.am
> ++++ b/test/core/Makefile.am
> +@@ -46,7 +46,8 @@ endif
> +
> + ## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we
> + ## build even when not doing "make check"
> +-noinst_PROGRAMS = \
> ++testdir = $(datadir)/@PACKAGE@/tests/core
> ++test_PROGRAMS = \
> + test-dbus-glib \
> + test-service-glib \
> + $(THREAD_APPS) \
> diff --git a/meta/recipes-core/dbus/dbus-glib.inc b/meta/recipes-core/dbus/dbus-glib.inc
> index f554ce8..a8e6d42 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"
> SRC_URI = "http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-${PV}.tar.gz \
> file://no-examples.patch \
> file://test-service-glib-include-glib-only.patch \
> + file://test-install-makefile.patch \
> "
>
> inherit autotools pkgconfig gettext
>
> +#default disable regression tests, some unit test code in non testing code
> +#PACKAGECONFIG_pn-${PN} = "tests" enable regression tests local.conf
> +PACKAGECONFIG ??= ""
> +PACKAGECONFIG[tests] = "--enable-tests,,,"
> +
> EXTRA_OECONF = "--with-introspect-xml=${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml \
> --with-dbus-binding-tool=${STAGING_BINDIR_NATIVE}/dbus-binding-tool"
> EXTRA_OECONF_virtclass-native = "--with-introspect-xml=${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml"
>
> -PACKAGES += "${PN}-bash-completion"
> +PACKAGES += "${PN}-bash-completion ${PN}-tests-dbg ${PN}-tests"
>
> FILES_${PN} = "${libdir}/lib*${SOLIBS}"
> 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
> FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
> FILES_${PN}-dev += "${bindir}/dbus-binding-tool"
>
> +RDEPENDS_${PN}-tests += "dbus-x11"
> +FILES_${PN}-tests = "${datadir}/${PN}/tests"
> +FILES_${PN}-tests-dbg = "${datadir}/${PN}/tests/.debug/* \
> + ${datadir}/${PN}/tests/core/.debug/* \
> + ${datadir}/${PN}/tests/interfaces/.debug/*"
> +
> BBCLASSEXTEND = "native"
>
Merged into OE-Core
Thanks
Sau!
prev parent reply other threads:[~2012-07-20 4:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-17 20:46 [PATCH v2] dbus-glib: add support for install regression tests Yao Zhao
2012-07-20 4:07 ` Saul Wold [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5008D96E.30702@linux.intel.com \
--to=sgw@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.