* [PATCH 0/4] RFC: ptest for danny
@ 2012-11-21 15:23 Björn Stenberg
2012-11-21 15:23 ` [PATCH 1/4] Add a new distro feature "ptest" Björn Stenberg
` (5 more replies)
0 siblings, 6 replies; 11+ messages in thread
From: Björn Stenberg @ 2012-11-21 15:23 UTC (permalink / raw)
To: openembedded-core
Hi all.
Here is an update of the "ptest" concept I introduced a few months back.
The idea is to create a new package group called -ptest which contains the
test suites included with many source packages, compiled to run on
target.
A new package, ptest-runnner, contains a simple shell script to find and
run all installed ptests.
Making ptest package recipes present a number of challenges. First, the
task of building and running the tests have to be split in two. Then, the
test files must be installed in the file system in a sane way.
I have included recipe patches for glib-2.0 and dbus here. They solve the
building and running relatively cleanly but the install bit is still a
rather kludgy list of cp and sed lines. I'm working on a more generic
"make ptest-install" solution.
These patches are against the "danny" branch.
Björn Stenberg (4):
Add a new distro feature "ptest"
New recipe: ptest-runner
Add ptest for glib-2.0.
Add ptest for dbus.
meta/classes/image.bbclass | 6 +-
meta/classes/packagegroup.bbclass | 2 +-
meta/conf/bitbake.conf | 15 +++-
meta/recipes-core/dbus/dbus-1.6.4/run-ptest | 3 +
.../dbus/dbus-1.6.4/test-run-path.patch | 26 ++++++
meta/recipes-core/dbus/dbus-test_1.6.4.bb | 84 ++++++++++++++++++++
meta/recipes-core/dbus/dbus.inc | 3 +
.../glib-2.0/glib-2.0/Makefile-ptest.patch | 30 +++++++
meta/recipes-core/glib-2.0/glib-2.0/run-ptest | 3 +
meta/recipes-core/glib-2.0/glib-2.0_2.32.4.bb | 57 +++++++++++++
.../automake/automake/buildtest.patch | 33 ++++++++
meta/recipes-devtools/automake/automake_1.12.3.bb | 3 +-
.../ptest-runner/files/ptest-runner | 19 +++++
.../ptest-runner/ptest-runner_1.0.bb | 17 ++++
14 files changed, 296 insertions(+), 5 deletions(-)
create mode 100755 meta/recipes-core/dbus/dbus-1.6.4/run-ptest
create mode 100644 meta/recipes-core/dbus/dbus-1.6.4/test-run-path.patch
create mode 100644 meta/recipes-core/dbus/dbus-test_1.6.4.bb
create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/Makefile-ptest.patch
create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/run-ptest
create mode 100644 meta/recipes-devtools/automake/automake/buildtest.patch
create mode 100644 meta/recipes-support/ptest-runner/files/ptest-runner
create mode 100644 meta/recipes-support/ptest-runner/ptest-runner_1.0.bb
--
1.7.5.4
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/4] Add a new distro feature "ptest"
2012-11-21 15:23 [PATCH 0/4] RFC: ptest for danny Björn Stenberg
@ 2012-11-21 15:23 ` Björn Stenberg
2012-11-21 15:23 ` [PATCH 2/4] New recipe: ptest-runner Björn Stenberg
` (4 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Björn Stenberg @ 2012-11-21 15:23 UTC (permalink / raw)
To: openembedded-core
This patch creates a new distro feature "ptest", which creates -ptest
packages containing the test suite of the package for running on the
target. Test files are installed in /usr/lib/<pkg>/ptest.
The patch also includes a change to automake, splitting the "make check"
target into separate steps for building and running the tests.
Signed-off-by: Björn Stenberg <bjst@enea.com>
---
meta/classes/image.bbclass | 6 ++-
meta/classes/packagegroup.bbclass | 2 +-
meta/conf/bitbake.conf | 15 ++++++++-
.../automake/automake/buildtest.patch | 33 ++++++++++++++++++++
meta/recipes-devtools/automake/automake_1.12.3.bb | 3 +-
5 files changed, 54 insertions(+), 5 deletions(-)
create mode 100644 meta/recipes-devtools/automake/automake/buildtest.patch
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index ab212b3..94182d1 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -29,13 +29,13 @@ ROOTFS_BOOTSTRAP_INSTALL = "${@base_contains("IMAGE_FEATURES", "package-manageme
FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}"
FEATURE_INSTALL_OPTIONAL = "${@' '.join(oe.packagegroup.optional_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}"
-# packages to install from features, excluding dev/dbg/doc
+# packages to install from features, excluding dev/dbg/doc/ptest
NORMAL_FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(normal_groups(d), d))}"
NORMAL_FEATURE_INSTALL_OPTIONAL = "${@' '.join(oe.packagegroup.optional_packages(normal_groups(d), d))}"
def normal_groups(d):
"""Return all the IMAGE_FEATURES, with the exception of our special package groups"""
- extras = set(['dev-pkgs', 'staticdev-pkgs', 'doc-pkgs', 'dbg-pkgs'])
+ extras = set(['dev-pkgs', 'staticdev-pkgs', 'doc-pkgs', 'dbg-pkgs', 'ptest-pkgs'])
features = set(oe.data.typed_value('IMAGE_FEATURES', d))
return features.difference(extras)
@@ -57,6 +57,8 @@ def complementary_globs(featurevar, d):
globs.append('*-doc')
elif feature == 'dbg-pkgs':
globs.append('*-dbg')
+ elif feature == 'ptest-pkgs':
+ globs.append('*-ptest')
return ' '.join(globs)
IMAGE_INSTALL_COMPLEMENTARY = '${@complementary_globs("IMAGE_FEATURES", d)}'
diff --git a/meta/classes/packagegroup.bbclass b/meta/classes/packagegroup.bbclass
index e0e5b1c..b5be048 100644
--- a/meta/classes/packagegroup.bbclass
+++ b/meta/classes/packagegroup.bbclass
@@ -25,7 +25,7 @@ python () {
packages = d.getVar('PACKAGES', True).split()
genpackages = []
for pkg in packages:
- for postfix in ['-dbg', '-dev']:
+ for postfix in ['-dbg', '-dev', '-ptest']:
genpackages.append(pkg+postfix)
d.setVar('PACKAGES', ' '.join(packages+genpackages))
}
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 5cb5b13..783ca37 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -223,6 +223,10 @@ SUMMARY_${PN}-dbg ?= "${SUMMARY} - Debugging files"
DESCRIPTION_${PN}-dbg ?= "${DESCRIPTION} \
This package contains ELF symbols and related sources for debugging purposes."
+SUMMARY_${PN}-ptest ?= "${SUMMARY} - Package test files"
+DESCRIPTION_${PN}-ptest ?= "${DESCRIPTION} \
+This package contains test directory with the name ${PTEST_NAME} for package test purposes."
+
SUMMARY_${PN}-dev ?= "${SUMMARY} - Development files"
DESCRIPTION_${PN}-dev ?= "${DESCRIPTION} \
This package contains symbolic links, header files, and \
@@ -266,7 +270,7 @@ SOLIBSDEV_darwin8 = ".dylib"
SOLIBSDEV_darwin9 = ".dylib"
PACKAGE_BEFORE_PN ?= ""
-PACKAGES = "${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}"
+PACKAGES = "${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PN}-ptest ${PACKAGE_BEFORE_PN} ${PN}"
PACKAGES_DYNAMIC = "${PN}-locale-*"
FILES = ""
@@ -310,6 +314,15 @@ SECTION_${PN}-dbg = "devel"
ALLOW_EMPTY_${PN}-dbg = "1"
RRECOMMENDS_${PN}-dbg = "${PN} (= ${EXTENDPKGV})"
+PTEST_PATH ?= "${libdir}/${PN}/ptest"
+FILES_${PN}-ptest = "${PTEST_PATH}/*"
+SECTION_${PN}-ptest = "devel"
+ALLOW_EMPTY_${PN}-ptest = "1"
+RDEPENDS_${PN}-ptest = "${PN} (= ${EXTENDPKGV})"
+PTEST_ENABLED = "${@base_contains("DISTRO_FEATURES", "ptest", "1", "0", d)}"
+RDEPENDS_${PN}-ptest_virtclass-native = ""
+RDEPENDS_${PN}-ptest_virtclass-nativesdk = ""
+
FILES_${PN}-locale = "${datadir}/locale"
# File manifest
diff --git a/meta/recipes-devtools/automake/automake/buildtest.patch b/meta/recipes-devtools/automake/automake/buildtest.patch
new file mode 100644
index 0000000..7efff6b
--- /dev/null
+++ b/meta/recipes-devtools/automake/automake/buildtest.patch
@@ -0,0 +1,33 @@
+Split "check-TESTS" into a buildtest and runtest target, so that they can
+be run separately.
+
+Signed-off-by: Björn Stenberg <bjst@enea.com>
+Upstream-Status: Pending
+
+--- a/lib/am/check.am 2012-11-14 13:46:16.335475995 +0100
++++ b/lib/am/check.am 2012-08-13 18:40:12.000000000 +0200
+@@ -44,7 +44,7 @@
+ am__tty_colors = $(am__tty_colors_dummy)
+ endif !%?COLOR%
+
+-.PHONY: check-TESTS
++.PHONY: check-TESTS buildtest-TESTS runtest-TESTS
+
+ if %?PARALLEL_TESTS%
+
+@@ -465,7 +465,14 @@
+
+ else !%?PARALLEL_TESTS%
+
+-check-TESTS: $(TESTS)
++AM_RECURSIVE_TARGETS += buildtest runtest
++
++buildtest-TESTS: $(TESTS)
++
++check-TESTS: buildtest-TESTS
++ $(MAKE) $(AM_MAKEFLAGS) runtest-TESTS
++
++runtest-TESTS:
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ srcdir=$(srcdir); export srcdir; \
+ ## Make sure Solaris VPATH-expands all members of this list, even
diff --git a/meta/recipes-devtools/automake/automake_1.12.3.bb b/meta/recipes-devtools/automake/automake_1.12.3.bb
index af99dfa..40169d3 100644
--- a/meta/recipes-devtools/automake/automake_1.12.3.bb
+++ b/meta/recipes-devtools/automake/automake_1.12.3.bb
@@ -37,7 +37,8 @@ PATHFIXPATCH_virtclass-nativesdk = ""
SRC_URI += "${PATHFIXPATCH} \
file://prefer-cpio-over-pax-for-ustar-archives.patch \
file://python-libdir.patch \
- file://py-compile-compile-only-optimized-byte-code.patch"
+ file://py-compile-compile-only-optimized-byte-code.patch \
+ file://buildtest.patch"
SRC_URI[md5sum] = "d2af8484de94cdee16d89c50aaa1c729"
SRC_URI[sha256sum] = "095ffaa3ac887d1eb3511bf13d7f1fc9ec0503c6a06aeae05c93730cdda9a5a0"
--
1.7.5.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/4] New recipe: ptest-runner
2012-11-21 15:23 [PATCH 0/4] RFC: ptest for danny Björn Stenberg
2012-11-21 15:23 ` [PATCH 1/4] Add a new distro feature "ptest" Björn Stenberg
@ 2012-11-21 15:23 ` Björn Stenberg
2012-11-21 15:23 ` [PATCH 3/4] Add ptest for glib-2.0 Björn Stenberg
` (3 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Björn Stenberg @ 2012-11-21 15:23 UTC (permalink / raw)
To: openembedded-core
This recipe installs a simple shell script which searches for all installed
ptests on the rootfs and runs each test in sequence.
Signed-off-by: Björn Stenberg <bjst@enea.com>
---
meta/conf/bitbake.conf | 2 +-
.../ptest-runner/files/ptest-runner | 16 ++++++++++++++++
.../ptest-runner/ptest-runner_1.0.bb | 17 +++++++++++++++++
3 files changed, 34 insertions(+), 1 deletions(-)
create mode 100644 meta/recipes-support/ptest-runner/files/ptest-runner
create mode 100644 meta/recipes-support/ptest-runner/ptest-runner_1.0.bb
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 783ca37..64014d3 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -225,7 +225,7 @@ This package contains ELF symbols and related sources for debugging purposes."
SUMMARY_${PN}-ptest ?= "${SUMMARY} - Package test files"
DESCRIPTION_${PN}-ptest ?= "${DESCRIPTION} \
-This package contains test directory with the name ${PTEST_NAME} for package test purposes."
+This package contains a test directory ${PTEST_PATH} for package test purposes."
SUMMARY_${PN}-dev ?= "${SUMMARY} - Development files"
DESCRIPTION_${PN}-dev ?= "${DESCRIPTION} \
diff --git a/meta/recipes-support/ptest-runner/files/ptest-runner b/meta/recipes-support/ptest-runner/files/ptest-runner
new file mode 100644
index 0000000..4f3c7ce
--- /dev/null
+++ b/meta/recipes-support/ptest-runner/files/ptest-runner
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+echo "START: $0"
+cd /usr/lib
+for x in *
+do
+ if [ -x "/usr/lib/$x/ptest/run-ptest" ]; then
+ date "+%Y-%m-%dT%H:%M"
+ echo "BEGIN: $x"
+ cd /usr/lib/$x/ptest
+ ./run-ptest
+ echo "END: $x"
+ date "+%Y-%m-%dT%H:%M"
+ fi
+done
+echo "STOP: $0"
diff --git a/meta/recipes-support/ptest-runner/ptest-runner_1.0.bb b/meta/recipes-support/ptest-runner/ptest-runner_1.0.bb
new file mode 100644
index 0000000..6b866d4
--- /dev/null
+++ b/meta/recipes-support/ptest-runner/ptest-runner_1.0.bb
@@ -0,0 +1,17 @@
+SRC_URI += "file://ptest-runner"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
+ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+do_install () {
+ mkdir -p ${D}${bindir}
+ install -m 0755 ${WORKDIR}/ptest-runner ${D}${bindir}
+}
+
+do_patch[noexec] = "1"
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+do_build[noexec] = "1"
--
1.7.5.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/4] Add ptest for glib-2.0.
2012-11-21 15:23 [PATCH 0/4] RFC: ptest for danny Björn Stenberg
2012-11-21 15:23 ` [PATCH 1/4] Add a new distro feature "ptest" Björn Stenberg
2012-11-21 15:23 ` [PATCH 2/4] New recipe: ptest-runner Björn Stenberg
@ 2012-11-21 15:23 ` Björn Stenberg
2012-11-21 15:23 ` [PATCH 4/4] Add ptest for dbus Björn Stenberg
` (2 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Björn Stenberg @ 2012-11-21 15:23 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Björn Stenberg <bjst@enea.com>
---
.../glib-2.0/glib-2.0/Makefile-ptest.patch | 30 ++++++++++
meta/recipes-core/glib-2.0/glib-2.0/run-ptest | 3 +
meta/recipes-core/glib-2.0/glib-2.0_2.32.4.bb | 57 ++++++++++++++++++++
.../ptest-runner/files/ptest-runner | 3 +
4 files changed, 93 insertions(+), 0 deletions(-)
create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/Makefile-ptest.patch
create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/run-ptest
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/Makefile-ptest.patch b/meta/recipes-core/glib-2.0/glib-2.0/Makefile-ptest.patch
new file mode 100644
index 0000000..b5b1498
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/Makefile-ptest.patch
@@ -0,0 +1,30 @@
+Add 'ptest' target to Makefile, to run tests without checking dependencies.
+
+Signed-off-by: Björn Stenberg <bjst@enea.com>
+Upstream-status: Pending
+---
+ Makefile.decl | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+--- a/Makefile.decl 2012-03-12 01:42:39.000000000 +0100
++++ b/Makefile.decl 2012-11-12 17:02:36.838107381 +0100
+@@ -25,6 +25,19 @@
+ test-nonrecursive:
+ endif
+
++ptest: ptest-nonrecursive
++if OS_UNIX
++ @ for subdir in $(SUBDIRS) .; do \
++ test -d "$$subdir" -a "$$subdir" != "." -a "$$subdir" != "po" && \
++ ( test -d $$subdir && cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) \
++ done
++
++ptest-nonrecursive:
++ @test -z "${TEST_PROGS}" || ${GTESTER} --keep-going --verbose ${TEST_PROGS}
++else
++ptest-nonrecursive:
++endif
++
+ # test-report: run tests in subdirs and generate report
+ # perf-report: run tests in subdirs with -m perf and generate report
+ # full-report: like test-report: with -m perf and -m slow
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/run-ptest b/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
new file mode 100644
index 0000000..3deb586
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+make -k ptest
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.32.4.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.32.4.bb
index 10c0b61..343b458 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.32.4.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.32.4.bb
@@ -15,6 +15,8 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
file://glib-2.0_fix_for_x32.patch \
file://nodbus.patch \
file://nolibelf.patch \
+ file://Makefile-ptest.patch \
+ file://run-ptest \
"
SRC_URI[md5sum] = "bf84fefd9c1a5b5a7a38736f4ddd674a"
SRC_URI[sha256sum] = "a5d742a4fda22fb6975a8c0cfcd2499dd1c809b8afd4ef709bda4d11b167fae2"
@@ -22,6 +24,38 @@ SRC_URI[sha256sum] = "a5d742a4fda22fb6975a8c0cfcd2499dd1c809b8afd4ef709bda4d11b1
SRC_URI_append_virtclass-native = " file://glib-gettextize-dir.patch"
BBCLASSEXTEND = "native nativesdk"
+RDEPENDS_${PN}-ptest += "\
+ eglibc-gconv-utf-16 \
+ eglibc-charmap-utf-8 \
+ eglibc-gconv-cp1255 \
+ eglibc-charmap-cp1255 \
+ eglibc-gconv-utf-32 \
+ eglibc-gconv-utf-7 \
+ eglibc-charmap-invariant \
+ eglibc-localedata-translit-cjk-variants \
+ tzdata \
+ tzdata-americas \
+ tzdata-asia \
+ tzdata-europe \
+ tzdata-posix \
+ python-pygobject \
+ python-dbus \
+ "
+
+FILES_${PN}-dbg += "${PTEST_PATH}/gio/.libs/.debug \
+ ${PTEST_PATH}/gio/tests/.debug \
+ ${PTEST_PATH}/gio/tests/.libs/.debug \
+ ${PTEST_PATH}/glib/.debug \
+ ${PTEST_PATH}/glib/.libs/.debug \
+ ${PTEST_PATH}/glib/tests/.debug \
+ ${PTEST_PATH}/glib/tests/.libs/.debug \
+ ${PTEST_PATH}/gobject/.libs/.debug \
+ ${PTEST_PATH}/gobject/tests/.debug \
+ ${PTEST_PATH}/gobject/tests/.libs/.debug \
+ ${PTEST_PATH}/tests/.debug \
+ ${PTEST_PATH}/tests/.libs/.debug \
+ ${PTEST_PATH}/tests/refcount/.libs/.debug"
+
do_configure_prepend() {
sed -i -e "s:TEST_PROGS += gdbus-serialization::g" ${S}/gio/tests/Makefile.am
sed -i -e '1s,#!.*,#!${USRBINPATH}/env python,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in
@@ -40,4 +74,27 @@ do_install_append() {
if [ -f ${D}${bindir}/glib-mkenums ]; then
sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/glib-mkenums
fi
+
+ if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ]; then
+ mkdir -p ${D}${PTEST_PATH}
+ install -m 0755 ${WORKDIR}/run-ptest ${D}${PTEST_PATH}
+
+ for subdir in tests glib/tests gobject/tests gio/tests; do
+ mkdir -p ${D}${PTEST_PATH}/$subdir
+ cp ${S}/$subdir/Makefile ${D}${PTEST_PATH}/$subdir
+ cp ${S}/$subdir/.libs/* ${D}${PTEST_PATH}/$subdir
+ done
+
+ cp ${S}/Makefile ${D}${PTEST_PATH}
+ cp ${S}/glib/Makefile ${D}${PTEST_PATH}/glib
+ cp ${S}/glib/.libs/gtester ${D}${PTEST_PATH}/glib
+ cp ${S}/glib/tests/pages.ini ${D}${PTEST_PATH}/glib/tests
+ cp ${S}/glib/tests/keyfiletest.ini ${D}${PTEST_PATH}/glib/tests
+ cp ${S}/glib/tests/empty ${D}${PTEST_PATH}/glib/tests
+ cp ${S}/glib/tests/echo-script ${D}${PTEST_PATH}/glib/tests
+ cp -r ${S}/glib/tests/bookmarks ${D}${PTEST_PATH}/glib/tests
+ cp -r ${S}/glib/tests/markups ${D}${PTEST_PATH}/glib/tests
+
+ find ${D}${PTEST_PATH} -name Makefile | xargs sed -i 's/^Makefile:/_Makefile:/'
+ fi
}
diff --git a/meta/recipes-support/ptest-runner/files/ptest-runner b/meta/recipes-support/ptest-runner/files/ptest-runner
index 4f3c7ce..5022218 100644
--- a/meta/recipes-support/ptest-runner/files/ptest-runner
+++ b/meta/recipes-support/ptest-runner/files/ptest-runner
@@ -1,5 +1,8 @@
#!/bin/sh
+export MALLOC_CHECK_=2
+export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))
+
echo "START: $0"
cd /usr/lib
for x in *
--
1.7.5.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 4/4] Add ptest for dbus.
2012-11-21 15:23 [PATCH 0/4] RFC: ptest for danny Björn Stenberg
` (2 preceding siblings ...)
2012-11-21 15:23 ` [PATCH 3/4] Add ptest for glib-2.0 Björn Stenberg
@ 2012-11-21 15:23 ` Björn Stenberg
2012-11-21 17:40 ` [PATCH 0/4] RFC: ptest for danny Otavio Salvador
2012-11-22 12:04 ` Björn Stenberg
5 siblings, 0 replies; 11+ messages in thread
From: Björn Stenberg @ 2012-11-21 15:23 UTC (permalink / raw)
To: openembedded-core
This patch adds a new recipe dbus-test to build and package the dbus test
suite. The reason for a separate recipe is that the dbus test suite depends
on dbus-glib, so it cannot be compiled at the same time as dbus.
An RDEPENDS rule is added to the dbus recipe to include the dbus-test
package into the image when ptest is enabled, since the standard -ptest
suffix mechanism does not apply to this package.
Signed-off-by: Björn Stenberg <bjst@enea.com>
---
meta/recipes-core/dbus/dbus-1.6.4/run-ptest | 3 +
.../dbus/dbus-1.6.4/test-run-path.patch | 26 ++++++
meta/recipes-core/dbus/dbus-test_1.6.4.bb | 84 ++++++++++++++++++++
meta/recipes-core/dbus/dbus.inc | 3 +
4 files changed, 116 insertions(+), 0 deletions(-)
create mode 100755 meta/recipes-core/dbus/dbus-1.6.4/run-ptest
create mode 100644 meta/recipes-core/dbus/dbus-1.6.4/test-run-path.patch
create mode 100644 meta/recipes-core/dbus/dbus-test_1.6.4.bb
diff --git a/meta/recipes-core/dbus/dbus-1.6.4/run-ptest b/meta/recipes-core/dbus/dbus-1.6.4/run-ptest
new file mode 100755
index 0000000..e08ecb1
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-1.6.4/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+cd test
+make -k runtest-TESTS
diff --git a/meta/recipes-core/dbus/dbus-1.6.4/test-run-path.patch b/meta/recipes-core/dbus/dbus-1.6.4/test-run-path.patch
new file mode 100644
index 0000000..5c08c93
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-1.6.4/test-run-path.patch
@@ -0,0 +1,26 @@
+
+
+Signed-off-by: Björn Stenberg <bjst@enea.com>
+Upstream-Status: Pending
+
+--- a/test/Makefile.am 2012-06-15 15:25:43.000000000 +0200
++++ b/test/Makefile.am 2012-11-16 09:24:44.263140840 +0100
+@@ -119,12 +119,13 @@
+ DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \
+ DBUS_TEST_SYSCONFDIR=$(DESTDIR)$(sysconfdir)
+
++ptest_run_dir = ..
++
+ TESTS_ENVIRONMENT = \
+- DBUS_BLOCK_ON_ABORT=1 \
+- DBUS_FATAL_WARNINGS=1 \
+- DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT) \
+- DBUS_TEST_DATA=@abs_top_builddir@/test/data \
+- DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \
++ DBUS_FATAL_WARNINGS=0 \
++ DBUS_TEST_DAEMON=$(ptest_run_dir)/bus/dbus-daemon$(EXEEXT) \
++ DBUS_TEST_DATA=$(ptest_run_dir)/test/data \
++ DBUS_TEST_HOMEDIR=$(ptest_run_dir)/dbus \
+ $(NULL)
+
+ test_corrupt_SOURCES = corrupt.c
diff --git a/meta/recipes-core/dbus/dbus-test_1.6.4.bb b/meta/recipes-core/dbus/dbus-test_1.6.4.bb
new file mode 100644
index 0000000..84829f7
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-test_1.6.4.bb
@@ -0,0 +1,84 @@
+DESCRIPTION = "D-Bus test package, only used for D-bus functionality test."
+HOMEPAGE = "http://dbus.freedesktop.org"
+SECTION = "base"
+LICENSE = "AFL-2 | GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
+ file://dbus/dbus.h;firstline=6;endline=20;md5=6eea2e0c7750dd8e620dcb1437312fa5"
+
+DEPENDS = "python-pygobject dbus dbus-glib"
+
+SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
+ file://tmpdir.patch \
+ file://test-run-path.patch \
+ file://dbus-1.init \
+ file://run-ptest \
+ "
+
+S="${WORKDIR}/dbus-${PV}"
+FILESPATH = "${FILE_DIRNAME}/dbus-${PV}"
+
+inherit autotools pkgconfig gettext
+
+EXTRA_OECONF_X = "${@base_contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}"
+EXTRA_OECONF_X_virtclass-native = "--without-x"
+
+EXTRA_OECONF = "--enable-tests \
+ --enable-checks \
+ --enable-asserts \
+ --enable-verbose-mode \
+ --disable-xml-docs \
+ --disable-doxygen-docs \
+ --disable-libaudit \
+ --with-xml=expat \
+ --with-systemdsystemunitdir=${systemd_unitdir}/system/ \
+ ${EXTRA_OECONF_X}"
+
+FILES_${PN}-dbg = "\
+ ${PTEST_PATH}/test/name-test/.debug \
+ ${PTEST_PATH}/test/.debug \
+ ${PTEST_PATH}/test/.libs/.debug \
+ ${PTEST_PATH}/.debug \
+ ${PTEST_PATH}/bus/.debug \
+ ${PTEST_PATH}/dbus/.debug \
+ ${PTEST_PATH}/tools/.debug \
+ ${PTEST_PATH}/tools/.libs/.debug \
+ /usr/src \
+ /usr/src/debug \
+ /usr/src/debug/${PN}-${PV}/dbus-${PV}/test/name-test/.debug \
+ /usr/src/debug/${PN}-${PV}/dbus-${PV}/test/.debug \
+ /usr/src/debug/${PN}-${PV}/dbus-${PV}/test/.libs/.debug \
+ /usr/src/debug/${PN}-${PV}/dbus-${PV}/.debug \
+ /usr/src/debug/${PN}-${PV}/dbus-${PV}/bus/.debug \
+ /usr/src/debug/${PN}-${PV}/dbus-${PV}/tools/.debug \
+ /usr/src/debug/${PN}-${PV}/dbus-${PV}/tools/.libs/.debug \
+ "
+
+FILES_${PN}-staticdev = "${PTEST_PATH}/test/.libs \
+ ${PTEST_PATH}/tools/.libs \
+ "
+do_install() {
+ mkdir -p ${D}${libdir}/${PN}
+ touch ${D}${libdir}/${PN}/empty_file
+
+ if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ] ; then
+ mkdir -p ${D}${PTEST_PATH}
+ install -m 0755 ${WORKDIR}/run-ptest ${D}${PTEST_PATH}
+ cp ${S}/Makefile ${D}${PTEST_PATH}
+
+ for subdir in dbus bus tools test doc; do
+ mkdir -p ${D}${PTEST_PATH}/$subdir
+ done
+
+ cp ${S}/bus/bus-test* ${D}${PTEST_PATH}/bus
+ cp ${S}/bus/dbus-daemon ${D}${PTEST_PATH}/bus
+ cp ${S}/dbus/dbus-test ${D}${PTEST_PATH}/dbus
+ cp ${S}/tools/.libs/* ${D}${PTEST_PATH}/tools
+
+ cp -r ${S}/test ${D}${PTEST_PATH}
+ find ${D}${PTEST_PATH}/test -name "*.[choa]" -o -name "*.la" | xargs rm
+ mv -f ${D}${PTEST_PATH}/test/.libs/* ${D}${PTEST_PATH}/test
+ rm -rf ${D}${PTEST_PATH}/test/.libs
+
+ find ${D}${PTEST_PATH} -name Makefile | xargs sed -i 's/^Makefile:/_Makefile:/'
+ fi
+}
diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
index 550eb0a..9e791d2 100644
--- a/meta/recipes-core/dbus/dbus.inc
+++ b/meta/recipes-core/dbus/dbus.inc
@@ -9,6 +9,9 @@ X11DEPENDS = "virtual/libx11 libsm"
DEPENDS = "expat virtual/libintl ${@base_contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}"
DEPENDS_virtclass-native = "expat-native virtual/libintl-native"
DEPENDS_virtclass-nativesdk = "nativesdk-expat virtual/nativesdk-libintl virtual/libx11"
+RDEPENDS = "${@base_contains('DISTRO_FEATURES', 'ptest', 'dbus-test', '', d)}"
+RDEPENDS_virtclass-native = ""
+
INC_PR = "r5"
--
1.7.5.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 0/4] RFC: ptest for danny
2012-11-21 15:23 [PATCH 0/4] RFC: ptest for danny Björn Stenberg
` (3 preceding siblings ...)
2012-11-21 15:23 ` [PATCH 4/4] Add ptest for dbus Björn Stenberg
@ 2012-11-21 17:40 ` Otavio Salvador
2012-11-22 12:19 ` Björn Stenberg
2012-11-22 12:04 ` Björn Stenberg
5 siblings, 1 reply; 11+ messages in thread
From: Otavio Salvador @ 2012-11-21 17:40 UTC (permalink / raw)
To: Björn Stenberg; +Cc: openembedded-core
On Wed, Nov 21, 2012 at 1:23 PM, Björn Stenberg <bjst@enea.com> wrote:
> These patches are against the "danny" branch.
Please base it in master branch as danny is now stable and this is a
new feature which might include regresions.
--
Otavio Salvador O.S. Systems
E-mail: otavio@ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/4] RFC: ptest for danny
2012-11-21 15:23 [PATCH 0/4] RFC: ptest for danny Björn Stenberg
` (4 preceding siblings ...)
2012-11-21 17:40 ` [PATCH 0/4] RFC: ptest for danny Otavio Salvador
@ 2012-11-22 12:04 ` Björn Stenberg
2012-11-22 12:11 ` Otavio Salvador
5 siblings, 1 reply; 11+ messages in thread
From: Björn Stenberg @ 2012-11-22 12:04 UTC (permalink / raw)
To: openembedded-core
I have a few specific issues I would like help and/or feedback on:
- The -ptest .ipk packages get installed with "Status: install user unpacked" rather than "install user installed", causing them to be processed by postinst. What do I have to do to take them from "unpacked" to "installed"?
- I have to add a lot of paths to the FILES-dbg to avoid QA warnings. It feels a bit kludgy, is there a cleaner way to handle this?
- What should we do with packages that don't have an upstream test suite? My first thought was to just ignore them, but one could also argue that a "SKIP: no package test" message would be more informative than no message at all, since it separate the package from yet-to-be-processed ones. Opinions?
- We have modified our buildbot to parse and collect the ptest output. Where would be a suitable place to discuss these modifications?
--
Björn
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/4] RFC: ptest for danny
2012-11-22 12:04 ` Björn Stenberg
@ 2012-11-22 12:11 ` Otavio Salvador
2012-11-22 12:28 ` Björn Stenberg
0 siblings, 1 reply; 11+ messages in thread
From: Otavio Salvador @ 2012-11-22 12:11 UTC (permalink / raw)
To: Björn Stenberg; +Cc: openembedded-core
On Thu, Nov 22, 2012 at 10:04 AM, Björn Stenberg <bjst@enea.com> wrote:
> I have a few specific issues I would like help and/or feedback on:
>
> - The -ptest .ipk packages get installed with "Status: install user unpacked" rather than "install user installed", causing them to be processed by postinst. What do I have to do to take them from "unpacked" to "installed"?
Your package postinst needs to be able to be run offline.
> - I have to add a lot of paths to the FILES-dbg to avoid QA warnings. It feels a bit kludgy, is there a cleaner way to handle this?
You might want to cook a python snip to automate it.
> - What should we do with packages that don't have an upstream test suite? My first thought was to just ignore them, but one could also argue that a "SKIP: no package test" message would be more informative than no message at all, since it separate the package from yet-to-be-processed ones. Opinions?
I agree an informative message would be good to have; maybe it could
be print only when have a verbose or debug option?
> - We have modified our buildbot to parse and collect the ptest output. Where would be a suitable place to discuss these modifications?
No clue here heheh
--
Otavio Salvador O.S. Systems
E-mail: otavio@ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/4] RFC: ptest for danny
2012-11-21 17:40 ` [PATCH 0/4] RFC: ptest for danny Otavio Salvador
@ 2012-11-22 12:19 ` Björn Stenberg
0 siblings, 0 replies; 11+ messages in thread
From: Björn Stenberg @ 2012-11-22 12:19 UTC (permalink / raw)
To: Otavio Salvador; +Cc: openembedded-core
Otavio Salvador wrote:
> Please base it in master branch as danny is now stable and this is a
> new feature which might include regresions.
I will post patches against master soon.
--
Björn
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/4] RFC: ptest for danny
2012-11-22 12:11 ` Otavio Salvador
@ 2012-11-22 12:28 ` Björn Stenberg
2012-11-22 12:54 ` Otavio Salvador
0 siblings, 1 reply; 11+ messages in thread
From: Björn Stenberg @ 2012-11-22 12:28 UTC (permalink / raw)
To: Otavio Salvador; +Cc: openembedded-core
Otavio Salvador wrote:
> > What do I have to do to take them from "unpacked" to "installed"?
> Your package postinst needs to be able to be run offline.
But they don't have any postinst. There are no .postinst files installed for these packages in /var/lib/opkg/info. run-postinst.awk goes through the motions and prints "Configuring:" for these packages only because the package status says "unpacked" instead of "installed". Nothing is ever ran.
--
Björn
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/4] RFC: ptest for danny
2012-11-22 12:28 ` Björn Stenberg
@ 2012-11-22 12:54 ` Otavio Salvador
0 siblings, 0 replies; 11+ messages in thread
From: Otavio Salvador @ 2012-11-22 12:54 UTC (permalink / raw)
To: Björn Stenberg; +Cc: openembedded-core
On Thu, Nov 22, 2012 at 10:28 AM, Björn Stenberg <bjst@enea.com> wrote:
> Otavio Salvador wrote:
>> > What do I have to do to take them from "unpacked" to "installed"?
>> Your package postinst needs to be able to be run offline.
>
> But they don't have any postinst. There are no .postinst files installed for these packages in /var/lib/opkg/info. run-postinst.awk goes through the motions and prints "Configuring:" for these packages only because the package status says "unpacked" instead of "installed". Nothing is ever ran.
When first booting it always try to run the post insts; this is need
to finish the configuration for the cases where it cannot be done
offline.
I think something is failing in your rootfs; please check the rootfs log.
--
Otavio Salvador O.S. Systems
E-mail: otavio@ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2012-11-22 13:09 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-21 15:23 [PATCH 0/4] RFC: ptest for danny Björn Stenberg
2012-11-21 15:23 ` [PATCH 1/4] Add a new distro feature "ptest" Björn Stenberg
2012-11-21 15:23 ` [PATCH 2/4] New recipe: ptest-runner Björn Stenberg
2012-11-21 15:23 ` [PATCH 3/4] Add ptest for glib-2.0 Björn Stenberg
2012-11-21 15:23 ` [PATCH 4/4] Add ptest for dbus Björn Stenberg
2012-11-21 17:40 ` [PATCH 0/4] RFC: ptest for danny Otavio Salvador
2012-11-22 12:19 ` Björn Stenberg
2012-11-22 12:04 ` Björn Stenberg
2012-11-22 12:11 ` Otavio Salvador
2012-11-22 12:28 ` Björn Stenberg
2012-11-22 12:54 ` Otavio Salvador
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox