Re: [OE-core] [PATCH] Enable ptest support for lttng.

2013-09-24 Thread Björn Stenberg
Stefan Seefeld wrote:
> +RDEPENDS_${PN}-ptest += "make"

I just noticed that the lttng-tools test suite is hardcoded for bash, so that 
is another dependency.

-- 
Björn
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] ptest-runner: compatibile with busybox

2013-09-23 Thread Björn Stenberg
rongqing...@windriver.com wrote:
> +for x in `find $libdir -name run-ptest -type f`
> +cd `dirname "$x"`

You can get this list of ptest dirs by just running `ls -d */ptest`. It is 
simpler and also much faster than using "find".

-- 
Björn
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/1] ptest-runner: trivial fixes and refine

2013-09-20 Thread Björn Stenberg
Randy MacLeod wrote:
> Yes, Roy will fix this. He's on holiday for a few days.

Excellent.

> I presume he'll add a check to see which arg to use for find
> rather than add a dependency on findutils.

I suggest skipping the find command altogether. The run-ptest files are defined 
to always sit in ${libdir}/${PN}/ptest and thus don't really need to be 
searched for.

Also, 'pushd' is not available in the busybox shell.

(I should have spotted these during patch review, but I was temporarily 
unavailable. Sorry about that.)

-- 
Björn
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/1] ptest-runner: trivial fixes and refine

2013-09-19 Thread Björn Stenberg
Chris Larson wrote:
> On Wed, Sep 11, 2013 at 2:17 AM,  wrote:
> 
> > +for x in `find -L ./ -name run-ptest -type f -perm /u+x,g+x`
> > +do
> >
> 
> As far as I can tell, busybox find doesn't support -L, so this adds an
> implicit, undeclared dependency upon findutils.

Rongquing, are you planning on fixing this? As committed, ptest-runner can't 
run on busybox systems (which I'd argue are the majority of embedded systems).

-- 
Björn
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/1] ptest-runner: trivial fixes and refine

2013-09-17 Thread Björn Stenberg
Chris Larson wrote:
> On Wed, Sep 11, 2013 at 2:17 AM,  wrote:
> 
> > +for x in `find -L ./ -name run-ptest -type f -perm /u+x,g+x`
> > +do
> >
> 
> As far as I can tell, busybox find doesn't support -L, so this adds an
> implicit, undeclared dependency upon findutils.

That is correct. Busybox find does however support -follow, which in turn GNU 
find does not...

-- 
Björn
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] systemd: add ptest

2013-08-28 Thread Björn Stenberg
rongqing...@windriver.com wrote:
> +DISTRO_FEATURES += " ptest"

This looks a bit odd to have in the recipe. Ptest should rather be 
enabled/disabled by the distro.conf or local.conf.

-- 
Björn
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] ptest recipes in progress

2013-08-05 Thread Björn Stenberg
Burton, Ross wrote:
> Do you plan on adding GStreamer to that list?

No, we have no plans for gstreamer pest. Feel free to run with it. :-)

-- 
Björn
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] busybox: Add ptest

2013-06-24 Thread Björn Stenberg
Install busybox test suite and run it as ptest.

Signed-off-by: Anders Roxell 
Signed-off-by: Björn Stenberg 
---
 meta/recipes-core/busybox/busybox.inc   |2 +-
 meta/recipes-core/busybox/busybox_1.20.2.bb |7 +++
 meta/recipes-core/busybox/files/run-ptest   |7 +++
 3 files changed, 15 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-core/busybox/files/run-ptest

diff --git a/meta/recipes-core/busybox/busybox.inc 
b/meta/recipes-core/busybox/busybox.inc
index c8908b0..4963912 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -41,7 +41,7 @@ CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf"
 
 RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc"
 
-inherit cml1 systemd update-rc.d
+inherit cml1 systemd update-rc.d ptest
 
 # internal helper
 def busybox_cfg(feature, features, tokens, cnf, rem):
diff --git a/meta/recipes-core/busybox/busybox_1.20.2.bb 
b/meta/recipes-core/busybox/busybox_1.20.2.bb
index 07d722d..9336671 100644
--- a/meta/recipes-core/busybox/busybox_1.20.2.bb
+++ b/meta/recipes-core/busybox/busybox_1.20.2.bb
@@ -34,6 +34,7 @@ SRC_URI = 
"http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://strict-atime.patch \
file://fail_on_no_media.patch \
file://busybox-sulogin-empty-root-password.patch \
+   file://run-ptest \
file://inetd.conf \
file://inetd"
 
@@ -41,3 +42,9 @@ SRC_URI[tarball.md5sum] = "e025414bc6cd79579cc7a32a45d3ae1c"
 SRC_URI[tarball.sha256sum] = 
"eb13ff01dae5618ead2ef6f92ba879e9e0390f9583bd545d8789d27cf39b6882"
 
 EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} 
SKIP_STRIP=y"
+
+do_install_ptest () {
+cp -r ${B}/testsuite ${D}${PTEST_PATH}/
+cp ${B}/.config  ${D}${PTEST_PATH}/
+ln -s /bin/busybox   ${D}${PTEST_PATH}/busybox
+}
diff --git a/meta/recipes-core/busybox/files/run-ptest 
b/meta/recipes-core/busybox/files/run-ptest
new file mode 100644
index 000..3608a8e
--- /dev/null
+++ b/meta/recipes-core/busybox/files/run-ptest
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+current_dir=$(readlink -f $0)
+export bindir=$(dirname $current_dir)
+
+cd testsuite || exit 1
+./runtest -v | sed -r 's/^(SKIPPED|UNTESTED):/SKIP:/'
-- 
1.7.10.4

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] ptest recipes in progress

2013-06-05 Thread Björn Stenberg
Hi all.

In the interest of avoiding duplication of work, here is a list of recipes for 
which we (Enea) have already enabled ptest but have not yet submitted patches:

- bash*
- busybox
- bzip2
- dbus*
- dhcp
- dropbear
- ethtool
- gcc-runtime
- gdb
- gdbm
- gettext
- glib-2.0*
- kmod
- libxml2
- openssh
- openssl
- python
- sqlite
- strace
- udev
- zlib

We've been occupied with internal work lately, but patches for these will be 
submitted as soon as we can.

* = These are already in oe-core, but we have bug fixes and/or updates for them.

-- 
Björn
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/1] perl-tests: convert to ptest

2013-05-21 Thread Björn Stenberg
Jesse Zhang wrote:
> Ok.. Here is the new commit.

Looks good to me.

Reviewed-by: Björn Stenberg 

-- 
Björn
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/1] perl-tests: convert to ptest

2013-05-17 Thread Björn Stenberg
Jesse Zhang wrote:
> +--- a/t/TEST 2013-05-15 23:12:12.705104588 -0400
>  b/t/TEST 2013-05-15 23:20:20.126104587 -0400

Is patching t/TEST better than simply using sed to transform the output?

I took a quick look at future versions and t/TEST is modified in both perl 
5.16.3 and 5.18.0-RC4. This means the patch will have to be manually updated 
for each of those version updates. And the patch cannot be upstreamed.

Unless there are clear advantages with patching t/TEST that I have overlooked, 
I suggest using sed in run-ptest instead.

-- 
Björn

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/1] perl-tests: convert to ptest

2013-05-15 Thread Björn Stenberg
Jesse Zhang wrote:
> How verbose should the output be? The TEST script actually does its own
> analyzing and summarizing of the test results. Do we want the summary
> only or all the details? Do you want the detailed output converted to
> ptest format too?
> 
> For example,
> 
> # ./TEST 
> t/base/condok
> t/base/if..ok
> t/base/lex.ok
> t/base/num.ok

I would say this higher-level form is OK. Just sed it into:

PASS: t/base/cond
PASS: t/base/if
PASS: t/base/lex
PASS: t/base/num

> The output from the actual test case conforms to the TAP format (not
> sure about the top-level TEST). If you have an analysis tool, why not
> support one more widely used format? I can't see much value in forcing
> one format everywhere.

There is no supplied analysis tool for ptest. Ptest is defined as producing a 
specific output format, to simplify parsing and analysis of the results however 
and wherever you want to do it.

The alternative would be to say that a specific analysis tool must be used 
which understands every different way of reporting results. And after going 
through a number of packages I can assure you are a lot of different ways to do 
that, some quite creative. It would mean that every package maintainer would 
also have to add the result format of his package into that analysis tool, 
likely creating a huge mess.

I prefer the current way of putting the responsibility on each package to 
produce a standard output format.

-- 
Björn

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/1] perl-tests: convert to ptest

2013-05-14 Thread Björn Stenberg
Jesse Zhang wrote:
> +++ b/meta/recipes-devtools/perl/perl-5.14.3/run-ptest
> @@ -0,0 +1,2 @@
> +#!/bin/sh
> +cd t && ./TEST

run-ptest also needs to parse the output and reformat results into the standard 
ptest/automake format, such as "PASS: foo", "FAIL: foo" and "SKIP: foo".

-- 
Björn

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] glib-2.0: disable tests for native builds, and respect ptest for LSB

2013-04-22 Thread Björn Stenberg
Ross Burton wrote:
> Without disabling the tests in the native build, glib-2.0-native will need
> libdbus-native to be present.  As we don't run the tests, disable them so we
> don't have build failures due to missing dependencies.
> 
> Also, the LSB override was missing PTEST_CONF so the same problem could 
> happen.
> After adding PTEST_CONF the LSB override is identical to the non-overridden
> EXTRA_OECONF, so remove it.
> 
> Finally, to be explicit, put --enable-module-tests in PTEST_CONF.
> 
> Signed-off-by: Ross Burton 
> ---
>  meta/recipes-core/glib-2.0/glib.inc |5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/meta/recipes-core/glib-2.0/glib.inc 
> b/meta/recipes-core/glib-2.0/glib.inc
> index cb391a2..42c34c3 100644
> --- a/meta/recipes-core/glib-2.0/glib.inc
> +++ b/meta/recipes-core/glib-2.0/glib.inc
> @@ -27,10 +27,9 @@ S = "${WORKDIR}/glib-${PV}"
>  
>  CORECONF = "--disable-dtrace --disable-fam --disable-libelf 
> --disable-systemtap"
>  
> -PTEST_CONF = "${@base_contains('DISTRO_FEATURES', 'ptest', '', 
> '--disable-modular-tests', d)}"
> +PTEST_CONF = "${@base_contains('DISTRO_FEATURES', 'ptest', 
> '--enable-modular-tests', '--disable-modular-tests', d)}"
>  EXTRA_OECONF = "--enable-included-printf=no ${CORECONF} ${PTEST_CONF}"
> -EXTRA_OECONF_class-native = "${CORECONF} --disable-selinux"
> -EXTRA_OECONF_linuxstdbase = "--enable-included-printf=no ${CORECONF}"
> +EXTRA_OECONF_class-native = "${CORECONF} --disable-selinux 
> --disable-modular-tests"
>  
>  FILES_${PN} = "${libdir}/lib*${SOLIBS} ${datadir}/glib-2.0/schemas \
> ${datadir}/glib-2.0/gettext/mkinstalldirs 
> ${datadir}/glib-2.0/gettext/po/Makefile.in.in"

Acked-By: Björn Stenberg 

-- 
Björn

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


Re: [OE-core] ptest results

2013-04-11 Thread Björn Stenberg
Björn Stenberg wrote:
> Your paste contains some errors that are clearly recipe/framework issues:

I forgot to say that I think we should separate between issues with the ptest 
framework (bbclass changes) and issues with specific package test suites.

In my view it is critical that we get the framework fixes into 1.4 so that this 
release can be used as a basis for wider ptest development, while improvements 
for specific test suites are less critical and can wait if necessary.

-- 
Björn

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH v4] ptest bug fixes

2013-04-10 Thread Björn Stenberg
Move ${PN}-ptest to start of PACKAGES to ensure all ptest files are
packaged in the -ptest package.

Add QA exclusions to insane.bbclass to ensure -ptest packages can contain
any files they need.

Disable ptest for native packages.

Don't emit errors on missing _ptest functions.

Signed-off-by: Björn Stenberg 
Signed-off-by: Anders Roxell 
Signed-off-by: Josep Puigdemont 
---
 meta/classes/insane.bbclass |6 +++---
 meta/classes/native.bbclass |3 +++
 meta/classes/ptest.bbclass  |   17 +
 3 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 75db7a2..336beaa 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -216,7 +216,7 @@ def package_qa_check_dev(path, name, d, elf, messages):
 Check for ".so" library symlinks in non-dev packages
 """
 
-if not name.endswith("-dev") and not name.endswith("-dbg") and not 
name.startswith("nativesdk-") and path.endswith(".so") and os.path.islink(path):
+if not name.endswith("-dev") and not name.endswith("-dbg") and not 
name.endswith("-ptest") and not name.startswith("nativesdk-") and 
path.endswith(".so") and os.path.islink(path):
 messages.append("non -dev/-dbg/-nativesdk package contains symlink 
.so: %s path '%s'" % \
  (name, package_qa_clean_path(path,d)))
 
@@ -229,7 +229,7 @@ def package_qa_check_staticdev(path, name, d, elf, 
messages):
 libgcc.a, libgcov.a will be skipped in their packages
 """
 
-if not name.endswith("-pic") and not name.endswith("-staticdev") and 
path.endswith(".a") and not path.endswith("_nonshared.a"):
+if not name.endswith("-pic") and not name.endswith("-staticdev") and not 
name.endswith("-ptest") and path.endswith(".a") and not 
path.endswith("_nonshared.a"):
 messages.append("non -staticdev package contains static .a library: %s 
path '%s'" % \
  (name, package_qa_clean_path(path,d)))
 
@@ -273,7 +273,7 @@ def package_qa_check_dbg(path, name, d, elf, messages):
 Check for ".debug" files or directories outside of the dbg package
 """
 
-if not "-dbg" in name:
+if not "-dbg" in name and not "-ptest" in name:
 if '.debug' in path.split(os.path.sep):
 messages.append("non debug package contains .debug directory: %s 
path %s" % \
  (name, package_qa_clean_path(path,d)))
diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index bfc9e4c..cd930f0 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -50,6 +50,9 @@ TOOLCHAIN_OPTIONS = ""
 
 DEPENDS_GETTEXT = "gettext-native"
 
+# Don't build ptest natively
+PTEST_ENABLED = "0"
+
 # Don't use site files for native builds
 export CONFIG_SITE = ""
 
diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass
index 6ab5ee4..37357e8 100644
--- a/meta/classes/ptest.bbclass
+++ b/meta/classes/ptest.bbclass
@@ -7,25 +7,18 @@ DESCRIPTION_${PN}-ptest ?= "${DESCRIPTION}  \
 This package contains a test directory ${PTEST_PATH} for package test 
purposes."
 
 PTEST_PATH ?= "${libdir}/${PN}/ptest"
-FILES_${PN}-ptest = "${PTEST_PATH}/*"
+FILES_${PN}-ptest = "${PTEST_PATH}"
 SECTION_${PN}-ptest = "devel"
 ALLOW_EMPTY_${PN}-ptest = "1"
 PTEST_ENABLED = "${@base_contains("DISTRO_FEATURES", "ptest", "1", "0", d)}"
 RDEPENDS_${PN}-ptest_virtclass-native = ""
 RDEPENDS_${PN}-ptest_virtclass-nativesdk = ""
 
-PACKAGES += "${@base_contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', 
d)}"
-
-FILES_${PN}-dbg += "${PTEST_PATH}/.debug \
-${PTEST_PATH}/*/.debug \
-${PTEST_PATH}/*/*/.debug \
-${PTEST_PATH}/*/*/*/.debug \
-${PTEST_PATH}/*/*/*/*/.debug \
-   "
+PACKAGES =+ "${@base_contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', 
d)}"
 
 do_configure_ptest_base() {
 if [ ${PTEST_ENABLED} = 1 ]; then
-if [ type -t do_configure_ptest = function ]; then
+if [ a$(type -t do_configure_ptest) = afunction ]; then
 do_configure_ptest
 fi
 fi
@@ -33,7 +26,7 @@ do_configure_ptest_base() {
 
 do_compile_ptest_base() {
 if [ ${PTEST_ENABLED} = 1 ]; then
-if [ type -t do_compile_ptest = function ]; then
+if [ a$(type -t do_compile_ptest)

Re: [OE-core] ptest results

2013-04-10 Thread Björn Stenberg
Saul Wold wrote:
> I ran ptest-runner finally I saw that there were failures, I am
> wondering if these are expected?
>
> http://pastebin.com/PAH3gJT0

Thank you for testing. Some test failures are to be expected. The purpose of 
ptest is to make the tests build and run. Fixing errors found by the tests is a 
separate job.

That said, it is not always immediately obvious which errors are due to 
recipe/framework malfunction and which are actual test failures. You paste 
contains some errors that are clearly recipe/framework issues:

- bash-ptest appears not have installed itself correctly. It looks like the 
do_install_ptest() action has not been run. I fail to repeat this. Are you 
seeing any errors in 
tmp/work/x86_64-poky-linux/bash/4.2-r6/temp/log.do_install_ptest_base?

- dbus-ptest-ptest has a similar issue. Its do_install_ptest contains a sed 
expression to remove the dependencies that cause the error you get. Again it 
appears the action has not been run for some reason. I can't repeat this either.

- Some test cases in dbus-ptest-ptest require /bin/sed, which your image 
doesn't have installed. The first-glance fix is to add sed as a runtime 
dependency, but that doesn't work with images built with busybox. I'm not sure 
what the proper fix is here.

- The references to gcc in the output are due to libtool issues that I have 
missed cleaning out. This is a bug in the dbus-ptest recipe.

- There is a path issue with some tests spawning binaries or opening files 
using the host build dir path, and obviously failing. This too is a 
recipe/testsuite bug.

> The bash packages did not seem to get split out correct, the ptest
> seem to land in ${PN} not in ${PN}-ptest, you might want to look
> into this also.

That would imply the PACKAGES prepend in ptest.bbclass isn't working. I can't 
repeat this on my end.

> With your patch, the ptest related debug files did go into the
> ${PN}-dbg, is this what you intend or should they go into a
> ${PN}-ptest-dbg package?

My intention, for now, is to put everything from /usr/lib/${PN}/ptest into 
${PN}-ptest. I'm not sure it is a good idea to split ptest packages into 
multiple packages, because each such split risks catching some test data file 
and move it into the wrong package. There is no rule or pattern to test data 
files.

-- 
Björn

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v2] ptest bugfix: Make all ptest files go into -ptest package

2013-04-08 Thread Björn Stenberg
Richard Purdie wrote:
> Why are we putting all the debug files into the -ptest package now? Does
> that make sense?

(Sorry, I missed this comment.)

My reasoning is that we want all ptest data to be contained in -ptest packages 
and not "leak" into other packages. 

If we keep debug data in the normal -dbg packages, you will always get ptest 
debug data installed in your image when defining distro-feature "ptest", even 
if it doesn't include any -ptest packages. That feels wrong to me.

-- 
Björn

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3] ptest bug fixes

2013-04-03 Thread Björn Stenberg
Move ${PN}-ptest to start of PACKAGES to ensure all ptest files are
packaged in the -ptest package.

Add QA exclusions to insane.bbclass to ensure -ptest packages can contain
any files they need.

Disable ptest for native packages.

Signed-off-by: Björn Stenberg 
---
 meta/classes/insane.bbclass |6 +++---
 meta/classes/native.bbclass |3 +++
 meta/classes/ptest.bbclass  |   15 ---
 3 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 2f10688..5170580 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -216,7 +216,7 @@ def package_qa_check_dev(path, name, d, elf, messages):
 Check for ".so" library symlinks in non-dev packages
 """
 
-if not name.endswith("-dev") and not name.endswith("-dbg") and not 
name.startswith("nativesdk-") and path.endswith(".so") and os.path.islink(path):
+if not name.endswith("-dev") and not name.endswith("-dbg") and not 
name.endswith("-ptest") and not name.startswith("nativesdk-") and 
path.endswith(".so") and os.path.islink(path):
 messages.append("non -dev/-dbg/-nativesdk package contains symlink 
.so: %s path '%s'" % \
  (name, package_qa_clean_path(path,d)))
 
@@ -229,7 +229,7 @@ def package_qa_check_staticdev(path, name, d, elf, 
messages):
 libgcc.a, libgcov.a will be skipped in their packages
 """
 
-if not name.endswith("-pic") and not name.endswith("-staticdev") and 
path.endswith(".a") and not path.endswith("_nonshared.a"):
+if not name.endswith("-pic") and not name.endswith("-staticdev") and not 
name.endswith("-ptest") and path.endswith(".a") and not 
path.endswith("_nonshared.a"):
 messages.append("non -staticdev package contains static .a library: %s 
path '%s'" % \
  (name, package_qa_clean_path(path,d)))
 
@@ -273,7 +273,7 @@ def package_qa_check_dbg(path, name, d, elf, messages):
 Check for ".debug" files or directories outside of the dbg package
 """
 
-if not "-dbg" in name:
+if not "-dbg" in name and not "-ptest" in name:
 if '.debug' in path.split(os.path.sep):
 messages.append("non debug package contains .debug directory: %s 
path %s" % \
  (name, package_qa_clean_path(path,d)))
diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index bfc9e4c..cd930f0 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -50,6 +50,9 @@ TOOLCHAIN_OPTIONS = ""
 
 DEPENDS_GETTEXT = "gettext-native"
 
+# Don't build ptest natively
+PTEST_ENABLED = "0"
+
 # Don't use site files for native builds
 export CONFIG_SITE = ""
 
diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass
index 6ab5ee4..c51c4e6 100644
--- a/meta/classes/ptest.bbclass
+++ b/meta/classes/ptest.bbclass
@@ -14,18 +14,11 @@ PTEST_ENABLED = "${@base_contains("DISTRO_FEATURES", 
"ptest", "1", "0", d)}"
 RDEPENDS_${PN}-ptest_virtclass-native = ""
 RDEPENDS_${PN}-ptest_virtclass-nativesdk = ""
 
-PACKAGES += "${@base_contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', 
d)}"
-
-FILES_${PN}-dbg += "${PTEST_PATH}/.debug \
-${PTEST_PATH}/*/.debug \
-${PTEST_PATH}/*/*/.debug \
-${PTEST_PATH}/*/*/*/.debug \
-${PTEST_PATH}/*/*/*/*/.debug \
-   "
+PACKAGES =+ "${@base_contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', 
d)}"
 
 do_configure_ptest_base() {
 if [ ${PTEST_ENABLED} = 1 ]; then
-if [ type -t do_configure_ptest = function ]; then
+if [ $(type -t do_configure_ptest) = function ]; then
 do_configure_ptest
 fi
 fi
@@ -33,7 +26,7 @@ do_configure_ptest_base() {
 
 do_compile_ptest_base() {
 if [ ${PTEST_ENABLED} = 1 ]; then
-if [ type -t do_compile_ptest = function ]; then
+if [ $(type -t do_compile_ptest) = function ]; then
 do_compile_ptest
 fi
 fi
@@ -46,7 +39,7 @@ do_install_ptest_base() {
 if grep -q install-ptest: Makefile; then
 oe_runmake DESTDIR=${D}${PTEST_PATH} install-ptest
 fi
-if [ type -t do_install_ptest = function ]; then
+if [ $(type -t do_install_ptest) = function ]; then
 do_install_ptest
 fi
 fi
-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2] ptest bugfix: Make all ptest files go into -ptest package

2013-03-25 Thread Björn Stenberg
Move ${PN}-ptest to start of PACKAGES to ensure all ptest files are
packaged in the -ptest package.

Add QA exclusions to insane.bbclass to ensure -ptest packages can contain
any files they need.

Bugfix: Add subshells for 'type' command.

This patch fixes bug #4069.

Signed-off-by: Björn Stenberg 
---
 meta/classes/insane.bbclass |6 +++---
 meta/classes/ptest.bbclass  |   15 ---
 2 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 2f10688..5170580 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -216,7 +216,7 @@ def package_qa_check_dev(path, name, d, elf, messages):
 Check for ".so" library symlinks in non-dev packages
 """
 
-if not name.endswith("-dev") and not name.endswith("-dbg") and not 
name.startswith("nativesdk-") and path.endswith(".so") and os.path.islink(path):
+if not name.endswith("-dev") and not name.endswith("-dbg") and not 
name.endswith("-ptest") and not name.startswith("nativesdk-") and 
path.endswith(".so") and os.path.islink(path):
 messages.append("non -dev/-dbg/-nativesdk package contains symlink 
.so: %s path '%s'" % \
  (name, package_qa_clean_path(path,d)))
 
@@ -229,7 +229,7 @@ def package_qa_check_staticdev(path, name, d, elf, 
messages):
 libgcc.a, libgcov.a will be skipped in their packages
 """
 
-if not name.endswith("-pic") and not name.endswith("-staticdev") and 
path.endswith(".a") and not path.endswith("_nonshared.a"):
+if not name.endswith("-pic") and not name.endswith("-staticdev") and not 
name.endswith("-ptest") and path.endswith(".a") and not 
path.endswith("_nonshared.a"):
 messages.append("non -staticdev package contains static .a library: %s 
path '%s'" % \
  (name, package_qa_clean_path(path,d)))
 
@@ -273,7 +273,7 @@ def package_qa_check_dbg(path, name, d, elf, messages):
 Check for ".debug" files or directories outside of the dbg package
 """
 
-if not "-dbg" in name:
+if not "-dbg" in name and not "-ptest" in name:
 if '.debug' in path.split(os.path.sep):
 messages.append("non debug package contains .debug directory: %s 
path %s" % \
  (name, package_qa_clean_path(path,d)))
diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass
index 6ab5ee4..c51c4e6 100644
--- a/meta/classes/ptest.bbclass
+++ b/meta/classes/ptest.bbclass
@@ -14,18 +14,11 @@ PTEST_ENABLED = "${@base_contains("DISTRO_FEATURES", 
"ptest", "1", "0", d)}"
 RDEPENDS_${PN}-ptest_virtclass-native = ""
 RDEPENDS_${PN}-ptest_virtclass-nativesdk = ""
 
-PACKAGES += "${@base_contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', 
d)}"
-
-FILES_${PN}-dbg += "${PTEST_PATH}/.debug \
-${PTEST_PATH}/*/.debug \
-${PTEST_PATH}/*/*/.debug \
-${PTEST_PATH}/*/*/*/.debug \
-${PTEST_PATH}/*/*/*/*/.debug \
-   "
+PACKAGES =+ "${@base_contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', 
d)}"
 
 do_configure_ptest_base() {
 if [ ${PTEST_ENABLED} = 1 ]; then
-if [ type -t do_configure_ptest = function ]; then
+if [ $(type -t do_configure_ptest) = function ]; then
 do_configure_ptest
 fi
 fi
@@ -33,7 +26,7 @@ do_configure_ptest_base() {
 
 do_compile_ptest_base() {
 if [ ${PTEST_ENABLED} = 1 ]; then
-if [ type -t do_compile_ptest = function ]; then
+if [ $(type -t do_compile_ptest) = function ]; then
 do_compile_ptest
 fi
 fi
@@ -46,7 +39,7 @@ do_install_ptest_base() {
 if grep -q install-ptest: Makefile; then
 oe_runmake DESTDIR=${D}${PTEST_PATH} install-ptest
 fi
-if [ type -t do_install_ptest = function ]; then
+if [ $(type -t do_install_ptest) = function ]; then
 do_install_ptest
 fi
 fi
-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/2] dbus: Depend on dbus-ptest-ptest

2013-03-25 Thread Björn Stenberg
(The subject was a mistake. Parent is the only patch.)

-- 
Björn

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/2] dbus: Depend on dbus-ptest-ptest

2013-03-25 Thread Björn Stenberg
The dbus-ptest recipe doesn't produce an output package called
dbus-ptest. What we are interested in is actually the dbus-ptest-ptest
package.

Signed-off-by: Björn Stenberg 
---
 meta/recipes-core/dbus/dbus.inc |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
index abc..50c102f 100644
--- a/meta/recipes-core/dbus/dbus.inc
+++ b/meta/recipes-core/dbus/dbus.inc
@@ -9,7 +9,7 @@ X11DEPENDS = "virtual/libx11 libsm"
 DEPENDS = "expat virtual/libintl ${@base_contains('DISTRO_FEATURES', 'x11', 
'${X11DEPENDS}', '', d)}"
 DEPENDS_class-native = "expat-native virtual/libintl-native"
 DEPENDS_class-nativesdk = "nativesdk-expat virtual/nativesdk-libintl"
-RDEPENDS_dbus = "${@base_contains('DISTRO_FEATURES', 'ptest', 'dbus-ptest', 
'', d)}"
+RDEPENDS_dbus = "${@base_contains('DISTRO_FEATURES', 'ptest', 
'dbus-ptest-ptest', '', d)}"
 RDEPENDS_class-native = ""
 
 INC_PR = "r6"
-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] ptest bugfix: Make all ptest files go into -ptest package

2013-03-22 Thread Björn Stenberg
Björn Stenberg wrote:
> Move ${PN}-ptest to start of PACKAGES to ensure all ptest files are
> packaged in the -ptest package.
> 
> Add QA exclusions to insane.bbclass to ensure -ptest packages can contain
> any files they need.
> 
> This patch fixes bug #4069.
> 
> Signed-off-by: Björn Stenberg 
> ---
>  meta/classes/insane.bbclass |6 +++---
>  meta/classes/ptest.bbclass  |9 +
>  2 files changed, 4 insertions(+), 11 deletions(-)

Don't merge this, it's not fully working. Updated patch coming next week.

-- 
Björn

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH] ptest bugfix: Make all ptest files go into -ptest package

2013-03-21 Thread Björn Stenberg
Move ${PN}-ptest to start of PACKAGES to ensure all ptest files are
packaged in the -ptest package.

Add QA exclusions to insane.bbclass to ensure -ptest packages can contain
any files they need.

This patch fixes bug #4069.

Signed-off-by: Björn Stenberg 
---
 meta/classes/insane.bbclass |6 +++---
 meta/classes/ptest.bbclass  |9 +
 2 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 2f10688..5170580 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -216,7 +216,7 @@ def package_qa_check_dev(path, name, d, elf, messages):
 Check for ".so" library symlinks in non-dev packages
 """
 
-if not name.endswith("-dev") and not name.endswith("-dbg") and not 
name.startswith("nativesdk-") and path.endswith(".so") and os.path.islink(path):
+if not name.endswith("-dev") and not name.endswith("-dbg") and not 
name.endswith("-ptest") and not name.startswith("nativesdk-") and 
path.endswith(".so") and os.path.islink(path):
 messages.append("non -dev/-dbg/-nativesdk package contains symlink 
.so: %s path '%s'" % \
  (name, package_qa_clean_path(path,d)))
 
@@ -229,7 +229,7 @@ def package_qa_check_staticdev(path, name, d, elf, 
messages):
 libgcc.a, libgcov.a will be skipped in their packages
 """
 
-if not name.endswith("-pic") and not name.endswith("-staticdev") and 
path.endswith(".a") and not path.endswith("_nonshared.a"):
+if not name.endswith("-pic") and not name.endswith("-staticdev") and not 
name.endswith("-ptest") and path.endswith(".a") and not 
path.endswith("_nonshared.a"):
 messages.append("non -staticdev package contains static .a library: %s 
path '%s'" % \
  (name, package_qa_clean_path(path,d)))
 
@@ -273,7 +273,7 @@ def package_qa_check_dbg(path, name, d, elf, messages):
 Check for ".debug" files or directories outside of the dbg package
 """
 
-if not "-dbg" in name:
+if not "-dbg" in name and not "-ptest" in name:
 if '.debug' in path.split(os.path.sep):
 messages.append("non debug package contains .debug directory: %s 
path %s" % \
  (name, package_qa_clean_path(path,d)))
diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass
index 6ab5ee4..69d2c68 100644
--- a/meta/classes/ptest.bbclass
+++ b/meta/classes/ptest.bbclass
@@ -14,14 +14,7 @@ PTEST_ENABLED = "${@base_contains("DISTRO_FEATURES", 
"ptest", "1", "0", d)}"
 RDEPENDS_${PN}-ptest_virtclass-native = ""
 RDEPENDS_${PN}-ptest_virtclass-nativesdk = ""
 
-PACKAGES += "${@base_contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', 
d)}"
-
-FILES_${PN}-dbg += "${PTEST_PATH}/.debug \
-${PTEST_PATH}/*/.debug \
-${PTEST_PATH}/*/*/.debug \
-${PTEST_PATH}/*/*/*/.debug \
-${PTEST_PATH}/*/*/*/*/.debug \
-   "
+PACKAGES =+ "${@base_contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', 
d)}"
 
 do_configure_ptest_base() {
 if [ ${PTEST_ENABLED} = 1 ]; then
-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] Problems with ptest and package splitting

2013-03-20 Thread Björn Stenberg
Hi. I need a little help.

The ${PN}-ptest group is not added to PACKAGES by default in bitbake.conf like 
all the other groups. Instead it is added to PACKAGES in ptest.bbclass. This 
way it is only added for those recipes that implement ptest.

However it turns out this doesn't work when package splitting. Instead of 
putting ptest files into packages-split/${PN}-ptest, those files are put into 
the core ${PN} package which is obviously not what we want.

I'm scratching my head a bit about why this happens, and would like help from 
people with deeper bitbake knowledge. I guess the splitting is somehow done 
outside the package scope, but why and how do we fix it?

Putting ${PN}-ptest in PACKAGES in bitbake.conf "solves" this issue, but 
Richard Purdie was against that earlier since we yet have only a few "ptest 
enabled" packages.

-- 
Björn

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/4] ptest: Move ptest checks from recipes to ptest.bbclass

2013-03-06 Thread Björn Stenberg
This patch cleans up ptest implementation in recipes by moving ptest
specific code parts into dedicated *_ptest functions.

Signed-off-by: Björn Stenberg 
---
 meta/classes/ptest.bbclass |   35 +--
 1 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass
index 131af7b..6ab5ee4 100644
--- a/meta/classes/ptest.bbclass
+++ b/meta/classes/ptest.bbclass
@@ -23,13 +23,36 @@ FILES_${PN}-dbg += "${PTEST_PATH}/.debug \
 ${PTEST_PATH}/*/*/*/*/.debug \
"
 
-ptest_do_install() {
-if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ]; then
-install -D ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/run-ptest
-if grep -q install-ptest: Makefile; then
-oe_runmake DESTDIR=${D}${PTEST_PATH} install-ptest
+do_configure_ptest_base() {
+if [ ${PTEST_ENABLED} = 1 ]; then
+if [ type -t do_configure_ptest = function ]; then
+do_configure_ptest
 fi
 fi
 }
 
-EXPORT_FUNCTIONS ptest_do_install
+do_compile_ptest_base() {
+if [ ${PTEST_ENABLED} = 1 ]; then
+if [ type -t do_compile_ptest = function ]; then
+do_compile_ptest
+fi
+fi
+}
+
+do_install_ptest_base() {
+if [ ${PTEST_ENABLED} = 1 ]; then
+if [ -f ${WORKDIR}/run-ptest ]; then
+install -D ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/run-ptest
+if grep -q install-ptest: Makefile; then
+oe_runmake DESTDIR=${D}${PTEST_PATH} install-ptest
+fi
+if [ type -t do_install_ptest = function ]; then
+do_install_ptest
+fi
+fi
+fi
+}
+
+addtask configure_ptest_base after do_configure before do_compile
+addtask compile_ptest_base   after do_compile   before do_install
+addtask install_ptest_base   after do_install   before do_package
-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH 4/4] bash: Use new _ptest functions

2013-03-06 Thread Björn Stenberg

Signed-off-by: Björn Stenberg 
---
 meta/recipes-extended/bash/bash.inc |   15 ++-
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/meta/recipes-extended/bash/bash.inc 
b/meta/recipes-extended/bash/bash.inc
index 20a23f0..c619f82 100644
--- a/meta/recipes-extended/bash/bash.inc
+++ b/meta/recipes-extended/bash/bash.inc
@@ -25,10 +25,8 @@ do_configure_prepend () {
fi
 }
 
-do_compile_append () {
-if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ]; then
-oe_runmake buildtest
-fi
+do_compile_ptest () {
+   oe_runmake buildtest
 }
 
 do_install_append () {
@@ -37,12 +35,11 @@ do_install_append () {
mkdir -p ${D}${base_bindir}
mv ${D}${bindir}/bash ${D}${base_bindir}
fi
+}
 
-if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ]; then
-ptest_do_install
-make INSTALL_TEST_DIR=${D}${PTEST_PATH}/tests install-test
-cp ${B}/Makefile ${D}${PTEST_PATH}
-fi
+do_install_ptest () {
+   make INSTALL_TEST_DIR=${D}${PTEST_PATH}/tests install-test
+   cp ${B}/Makefile ${D}${PTEST_PATH}
 }
 
 pkg_postinst_${PN} () {
-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH 2/4] dbus: Use new _ptest functions

2013-03-06 Thread Björn Stenberg

Signed-off-by: Björn Stenberg 
---
 meta/recipes-core/dbus/dbus-ptest_1.6.8.bb |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-core/dbus/dbus-ptest_1.6.8.bb 
b/meta/recipes-core/dbus/dbus-ptest_1.6.8.bb
index 1382206..d00819a 100644
--- a/meta/recipes-core/dbus/dbus-ptest_1.6.8.bb
+++ b/meta/recipes-core/dbus/dbus-ptest_1.6.8.bb
@@ -41,6 +41,8 @@ EXTRA_OECONF = "--enable-tests \
 ${EXTRA_OECONF_X}"
 
 do_install() {
-ptest_do_install
+}
+
+do_install_ptest() {
 find ${D}${PTEST_PATH} -name Makefile | xargs sed -i 
's/^Makefile:/_Makefile:/'
 }
-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH 0/4] Move ptest checks from recipes to ptest.bbclass

2013-03-06 Thread Björn Stenberg
In response to feedback about the ptest checks added to recipes when
implementing ptest, I have changed it so those checks now only exist in
ptest.bbclass and recipes instead use dedicated _ptest functions to define
ptest-specific actions.

Björn Stenberg (4):
  ptest: Move ptest checks from recipes to ptest.bbclass
  dbus: Use new _ptest functions
  glib: Use new _ptest functions
  bash: Use new _ptest functions

 meta/classes/ptest.bbclass|   35 
 meta/recipes-core/dbus/dbus-ptest_1.6.8.bb|4 ++-
 meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb |2 -
 meta/recipes-extended/bash/bash.inc   |   15 --
 4 files changed, 38 insertions(+), 18 deletions(-)

-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH 3/4] glib: Use new _ptest functions

2013-03-06 Thread Björn Stenberg

Signed-off-by: Björn Stenberg 
---
 meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb 
b/meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb
index d58d489..7795524 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb
@@ -60,6 +60,4 @@ do_install_append() {
   if [ -f ${D}${bindir}/glib-mkenums ]; then
 sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' 
${D}${bindir}/glib-mkenums
   fi
-
-  ptest_do_install
 }
-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 2/8] zlib: Add ptest

2013-02-22 Thread Björn Stenberg
Richard Purdie wrote:
> > +RDEPENDS_${PN}-ptest += "make"
> > +RDEPENDS_${PN}-ptest_virtclass-native = ""
> > +RDEPENDS_${PN}-ptest_virtclass-nativesdk = ""
> 
> The above scares me. Why? This is going to make packaging of zlib
> dependent on the packaging of make, due to the way our packaging works.

Will it? The intention is to specify that make is only required for running 
zlib-ptest (and only on target). We do a similar RDEPENDS-ptest declaration in 
glib-2.0, adding some tzdata and python packages.

I must admit to not building without ptest very often, but I was under the 
impression this works as intended.

> I also wonder if the make dependency itself isn't best left against the
> main ptest-runner script itself rather and each ptest package.

While make is used by many test suites and could be added to ptest-runnner to 
reduce clutter in other recipes, I think it is the wrong thing to do. You don't 
have to install ptest-runner to run ptests, it is merely a convenience script 
that makes it easier to run all of them at once.

Also, make is not the only package required by test suites. For example the 
gcc-runtime test suite I'll be submitting soon depends on dejagnu (which 
depends on expect, which depends on tcl). And others still depend on perl or 
other largeish packages.

> > +FILES_${PN}-dbg += "${PTEST_PATH}/.debug"
> Is this needed after the other fix?

No, this was a leftover mistake. Thanks for spotting it.

-- 
Björn

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/8 v2] busybox: Add ptest

2013-02-20 Thread Björn Stenberg
From: Daniel Dai 


Signed-off-by: Björn Stenberg 
---
 meta/recipes-core/busybox/busybox.inc   |2 +-
 meta/recipes-core/busybox/busybox_1.20.2.bb |   10 ++
 meta/recipes-core/busybox/files/run-ptest   |7 +++
 3 files changed, 18 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-core/busybox/files/run-ptest

diff --git a/meta/recipes-core/busybox/busybox.inc 
b/meta/recipes-core/busybox/busybox.inc
index fc6ca91..85851dd 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -37,7 +37,7 @@ CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf"
 
 RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc"
 
-inherit cml1 update-rc.d
+inherit cml1 update-rc.d ptest
 
 # internal helper
 def busybox_cfg(feature, features, tokens, cnf, rem):
diff --git a/meta/recipes-core/busybox/busybox_1.20.2.bb 
b/meta/recipes-core/busybox/busybox_1.20.2.bb
index 783261e..b2e5d47 100644
--- a/meta/recipes-core/busybox/busybox_1.20.2.bb
+++ b/meta/recipes-core/busybox/busybox_1.20.2.bb
@@ -28,9 +28,19 @@ SRC_URI = 
"http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://fix-for-spurious-testsuite-failure.patch \
file://busybox-1.20.2-kernel_ver.patch \
file://stat-usr-bin.patch \
+   file://run-ptest \
file://testsuite-du-du-k-works-fix-false-positive.patch"
 
 SRC_URI[tarball.md5sum] = "e025414bc6cd79579cc7a32a45d3ae1c"
 SRC_URI[tarball.sha256sum] = 
"eb13ff01dae5618ead2ef6f92ba879e9e0390f9583bd545d8789d27cf39b6882"
 
 EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} 
SKIP_STRIP=y"
+
+do_install_append () {
+if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ]; then
+ptest_do_install
+cp -r ${B}/testsuite ${D}${PTEST_PATH}/
+cp ${B}/.config  ${D}${PTEST_PATH}/
+ln -s /bin/busybox   ${D}${PTEST_PATH}/busybox
+fi
+}
diff --git a/meta/recipes-core/busybox/files/run-ptest 
b/meta/recipes-core/busybox/files/run-ptest
new file mode 100644
index 000..3608a8e
--- /dev/null
+++ b/meta/recipes-core/busybox/files/run-ptest
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+current_dir=$(readlink -f $0)
+export bindir=$(dirname $current_dir)
+
+cd testsuite || exit 1
+./runtest -v | sed -r 's/^(SKIPPED|UNTESTED):/SKIP:/'
-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH 8/8] ptest: Add missed .debug path

2013-02-19 Thread Björn Stenberg

Signed-off-by: Björn Stenberg 
---
 meta/classes/ptest.bbclass |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass
index 361de78..131af7b 100644
--- a/meta/classes/ptest.bbclass
+++ b/meta/classes/ptest.bbclass
@@ -16,7 +16,8 @@ RDEPENDS_${PN}-ptest_virtclass-nativesdk = ""
 
 PACKAGES += "${@base_contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', 
d)}"
 
-FILES_${PN}-dbg += "${PTEST_PATH}/*/.debug \
+FILES_${PN}-dbg += "${PTEST_PATH}/.debug \
+${PTEST_PATH}/*/.debug \
 ${PTEST_PATH}/*/*/.debug \
 ${PTEST_PATH}/*/*/*/.debug \
 ${PTEST_PATH}/*/*/*/*/.debug \
-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH 5/8] bzip2: Add ptest

2013-02-19 Thread Björn Stenberg

Signed-off-by: Björn Stenberg 
---
 .../recipes-extended/bzip2/bzip2-1.0.6/Makefile.am |   32 
 meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest  |2 +
 meta/recipes-extended/bzip2/bzip2_1.0.6.bb |   10 +-
 3 files changed, 43 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest

diff --git a/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am 
b/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am
index 070d57b..96cc309 100644
--- a/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am
+++ b/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am
@@ -26,6 +26,38 @@ bin_SCRIPTS = bzgrep bzmore bzdiff
 man_MANS = bzip2.1 bzgrep.1 bzmore.1 bzdiff.1
 EXTRA_DIST = $(man_MANS)
 
+runtest:
+   ./bzip2 -1  < sample1.ref > sample1.rb2
+   ./bzip2 -2  < sample2.ref > sample2.rb2
+   ./bzip2 -3  < sample3.ref > sample3.rb2
+   ./bzip2 -d  < sample1.bz2 > sample1.tst
+   ./bzip2 -d  < sample2.bz2 > sample2.tst
+   ./bzip2 -ds < sample3.bz2 > sample3.tst
+   @if cmp sample1.bz2 sample1.rb2; then echo "PASS: sample1 compress";\
+   else echo "FAIL: sample1 compress"; fi
+   @if cmp sample2.bz2 sample2.rb2; then echo "PASS: sample2 compress";\
+   else echo "FAIL: sample2 compress"; fi
+   @if cmp sample3.bz2 sample3.rb2; then echo "PASS: sample3 compress";\
+   else echo "FAIL: sample3 compress"; fi
+   @if cmp sample1.tst sample1.ref; then echo "PASS: sample1 decompress";\
+   else echo "FAIL: sample1 decompress"; fi
+   @if cmp sample2.tst sample2.ref; then echo "PASS: sample2 decompress";\
+   else echo "FAIL: sample2 decompress"; fi
+   @if cmp sample3.tst sample3.ref; then echo "PASS: sample3 decompress";\
+   else echo "FAIL: sample3 decompress"; fi
+
+install-ptest:
+   mkdir -p $(PTESTDIR)/
+   install -m 0755 $(WDIR)/run-ptest   $(PTESTDIR)/
+   install -m 0755 $(BDIR)/Makefile$(PTESTDIR)/
+   install -m 0755 $(BDIR)/sample1.ref $(PTESTDIR)/
+   install -m 0755 $(BDIR)/sample2.ref $(PTESTDIR)/
+   install -m 0755 $(BDIR)/sample3.ref $(PTESTDIR)/
+   install -m 0755 $(BDIR)/sample1.bz2 $(PTESTDIR)/
+   install -m 0755 $(BDIR)/sample2.bz2 $(PTESTDIR)/
+   install -m 0755 $(BDIR)/sample3.bz2 $(PTESTDIR)/
+   ln -s $(bindir)/bzip2   $(PTESTDIR)/bzip2
+
 install-exec-hook:
ln -s $(bindir)/bzip2$(EXEEXT) $(DESTDIR)$(bindir)/bunzip2$(EXEEXT)
ln -s $(bindir)/bzip2$(EXEEXT) $(DESTDIR)$(bindir)/bzcat$(EXEEXT)
diff --git a/meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest 
b/meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest
new file mode 100644
index 000..3b20fce
--- /dev/null
+++ b/meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest
@@ -0,0 +1,2 @@
+#!/bin/sh
+make -k runtest
diff --git a/meta/recipes-extended/bzip2/bzip2_1.0.6.bb 
b/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
index 6e160cd..e58e3c5 100644
--- a/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
+++ b/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
@@ -10,6 +10,7 @@ PR = "r5"
 
 SRC_URI = "http://www.bzip.org/${PV}/${BPN}-${PV}.tar.gz \
file://configure.ac \
+   file://run-ptest \
   file://Makefile.am"
 
 SRC_URI[md5sum] = "00b516f4704d4a7cb50a1d97e6e8e15b"
@@ -19,7 +20,7 @@ PACKAGES =+ "libbz2 libbz2-dev libbz2-staticdev"
 
 CFLAGS_append = " -fPIC -fpic -Winline -fno-strength-reduce 
-D_FILE_OFFSET_BITS=64"
 
-inherit autotools update-alternatives
+inherit autotools update-alternatives ptest
 
 ALTERNATIVE_PRIORITY = "100"
 ALTERNATIVE_${PN} = "bunzip2 bzcat"
@@ -32,6 +33,13 @@ do_configure_prepend () {
cp ${STAGING_DATADIR_NATIVE}/automake*/install-sh ${S}/
 }
 
+do_install_append () {
+   if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ]; then
+   make PTESTDIR=${D}${PTEST_PATH} WDIR=${WORKDIR} BDIR=${B} 
install-ptest
+sed -i -e "s|^Makefile:|_Makefile:|" ${D}${PTEST_PATH}/Makefile
+   fi
+}
+
 FILES_libbz2 = "${libdir}/lib*${SOLIBS}"
 
 FILES_libbz2-dev = "${includedir} ${libdir}/lib*${SOLIBSDEV}"
-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH 7/8] openssl: Add ptest

2013-02-19 Thread Björn Stenberg
Signed-off-by: Björn Stenberg 
---
 .../openssl/openssl-1.0.0j/Makefiles-ptest.patch   |   74 
 .../openssl/openssl-1.0.0j/run-ptest   |2 +
 meta/recipes-connectivity/openssl/openssl.inc  |   19 +-
 .../recipes-connectivity/openssl/openssl_1.0.0j.bb |2 +
 4 files changed, 96 insertions(+), 1 deletions(-)
 create mode 100644 
meta/recipes-connectivity/openssl/openssl-1.0.0j/Makefiles-ptest.patch
 create mode 100644 meta/recipes-connectivity/openssl/openssl-1.0.0j/run-ptest

diff --git 
a/meta/recipes-connectivity/openssl/openssl-1.0.0j/Makefiles-ptest.patch 
b/meta/recipes-connectivity/openssl/openssl-1.0.0j/Makefiles-ptest.patch
new file mode 100644
index 000..e65f17b
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-1.0.0j/Makefiles-ptest.patch
@@ -0,0 +1,74 @@
+Add 'buildtest' and 'runtest' targets to Makefile, to build and run tests
+cross-compiled.
+
+Signed-off-by: Anders Roxell 
+Upstream-Status: Pending
+---
+diff -uNr a/Makefile b/Makefile
+--- a/Makefile.org 2012-05-10 17:06:02.0 +0200
 b/Makefile.org 2012-10-27 00:05:55.359424024 +0200
+@@ -411,8 +411,16 @@
+ test:   tests
+ 
+ tests: rehash
++  $(MAKE) buildtest
++  $(MAKE) runtest
++
++buildtest:
++  @(cd test && \
++  $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' 
OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf exe apps);
++
++runtest:
+   @(cd test && echo "testing..." && \
+-  $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' 
OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf tests );
++  $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' 
OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf alltests );
+   OPENSSL_CONF=apps/openssl.cnf util/opensslwrap.sh version -a
+ 
+ report:
+diff --git a/test/Makefile b/test/Makefile
+index 3912f82..1696767 100644
+--- a/test/Makefile
 b/test/Makefile
+@@ -128,7 +128,7 @@ tests: exe apps $(TESTS)
+ apps:
+   @(cd ..; $(MAKE) DIRS=apps all)
+ 
+-alltests: \
++all-tests= \
+   test_des test_idea test_sha test_md4 test_md5 test_hmac \
+   test_md2 test_mdc2 test_wp \
+   test_rmd test_rc2 test_rc4 test_rc5 test_bf test_cast test_aes \
+@@ -138,6 +138,11 @@ alltests: \
+   test_ss test_ca test_engine test_evp test_ssl test_tsa test_ige \
+   test_jpake test_cms
+ 
++alltests:
++  @(for i in $(all-tests); do \
++  ( $(MAKE) $$i && echo "PASS: $$i" ) || echo "FAIL: $$i"; \
++  done)
++
+ test_evp:
+   ../util/shlib_wrap.sh ./$(EVPTEST) evptests.txt
+ 
+@@ -203,7 +208,7 @@ test_x509:
+   echo test second x509v3 certificate
+   sh ./tx509 v3-cert2.pem 2>/dev/null
+ 
+-test_rsa: $(RSATEST)$(EXE_EXT)
++test_rsa:
+   @sh ./trsa 2>/dev/null
+   ../util/shlib_wrap.sh ./$(RSATEST)
+ 
+@@ -298,11 +303,11 @@ test_tsa:
+ sh ./testtsa; \
+   fi
+ 
+-test_ige: $(IGETEST)$(EXE_EXT)
++test_ige:
+   @echo "Test IGE mode"
+   ../util/shlib_wrap.sh ./$(IGETEST)
+ 
+-test_jpake: $(JPAKETEST)$(EXE_EXT)
++test_jpake:
+   @echo "Test JPAKE"
+   ../util/shlib_wrap.sh ./$(JPAKETEST)
diff --git a/meta/recipes-connectivity/openssl/openssl-1.0.0j/run-ptest 
b/meta/recipes-connectivity/openssl/openssl-1.0.0j/run-ptest
new file mode 100644
index 000..3b20fce
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-1.0.0j/run-ptest
@@ -0,0 +1,2 @@
+#!/bin/sh
+make -k runtest
diff --git a/meta/recipes-connectivity/openssl/openssl.inc 
b/meta/recipes-connectivity/openssl/openssl.inc
index e1e7b65..62acf95 100644
--- a/meta/recipes-connectivity/openssl/openssl.inc
+++ b/meta/recipes-connectivity/openssl/openssl.inc
@@ -33,7 +33,7 @@ export DIRS = "crypto ssl apps"
 export EX_LIBS = "-lgcc -ldl"
 export AS = "${CC} -c"
 
-inherit pkgconfig siteinfo
+inherit pkgconfig siteinfo ptest
 
 PACKAGES =+ "libcrypto libssl ${PN}-misc"
 FILES_libcrypto = "${base_libdir}/libcrypto${SOLIBS}"
@@ -42,6 +42,8 @@ FILES_${PN} =+ " ${libdir}/ssl/*"
 FILES_${PN}-misc = "${libdir}/ssl/misc ${libdir}/ssl/openssl.cnf"
 FILES_${PN}-dev += "${base_libdir}/libcrypto${SOLIBSDEV}"
 
+RDEPENDS_${PN}-ptest = "openssl-misc"
+
 do_configure_prepend_darwin () {
sed -i -e '/version-script=openssl\.ld/d' Configure
 }
@@ -125,6 +127,9 @@ do_configure () {
 
 do_compile () {
oe_runmake
+   if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ] ; then
+   oe_runmake buildtest
+   fi
 }
 
 do_install () {
@@ -144,6 +149,18 @@ do_install () {
cp --dereference -R include/openssl ${D}${includedir}
sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${libdir}/ssl/misc/CA.pl
 
+

[OE-core] [PATCH 6/8] openssh: Add ptest

2013-02-19 Thread Björn Stenberg

Signed-off-by: Björn Stenberg 
---
 .../add-test-support-for-busybox.patch |   61 
 .../openssh/openssh-6.1p1/run-ptest|7 ++
 meta/recipes-connectivity/openssh/openssh_6.1p1.bb |   11 +++-
 3 files changed, 78 insertions(+), 1 deletions(-)
 create mode 100644 
meta/recipes-connectivity/openssh/openssh-6.1p1/add-test-support-for-busybox.patch
 create mode 100755 meta/recipes-connectivity/openssh/openssh-6.1p1/run-ptest

diff --git 
a/meta/recipes-connectivity/openssh/openssh-6.1p1/add-test-support-for-busybox.patch
 
b/meta/recipes-connectivity/openssh/openssh-6.1p1/add-test-support-for-busybox.patch
new file mode 100644
index 000..5913597
--- /dev/null
+++ 
b/meta/recipes-connectivity/openssh/openssh-6.1p1/add-test-support-for-busybox.patch
@@ -0,0 +1,61 @@
+Adjust test cases to work with busybox.
+
+- Replace dd parameter "obs" with "bs".
+- Replace "head -" with "head -n ".
+
+Signed-off-by: Björn Stenberg 
+Upstream-status: Pending
+
+--- a/regress/cipher-speed.sh  2012-06-30 07:08:53.0 +0200
 b/regress/cipher-speed.sh  2013-02-15 11:30:20.670022055 +0100
+@@ -26,7 +26,7 @@
+   echon "$c/$m:\t"
+   ( ${SSH} -o 'compression no' \
+   -F $OBJ/ssh_proxy -2 -m $m -c $c somehost \
+-  exec sh -c \'"dd of=/dev/null obs=32k"\' \
++  exec sh -c \'"dd of=/dev/null bs=32k"\' \
+   < ${DATA} ) 2>&1 | getbytes
+ 
+   if [ $? -ne 0 ]; then
+@@ -42,7 +42,7 @@
+   echon "$c:\t"
+   ( ${SSH} -o 'compression no' \
+   -F $OBJ/ssh_proxy -1 -c $c somehost \
+-  exec sh -c \'"dd of=/dev/null obs=32k"\' \
++  exec sh -c \'"dd of=/dev/null bs=32k"\' \
+   < ${DATA} ) 2>&1 | getbytes
+   if [ $? -ne 0 ]; then
+   fail "ssh -1 failed with cipher $c"
+--- a/regress/transfer.sh  2003-09-04 06:54:40.0 +0200
 b/regress/transfer.sh  2013-02-15 11:25:34.666411185 +0100
+@@ -18,7 +18,7 @@
+   for s in 10 100 1k 32k 64k 128k 256k; do
+   trace "proto $p dd-size ${s}"
+   rm -f ${COPY}
+-  dd if=$DATA obs=${s} 2> /dev/null | \
++  dd if=$DATA bs=${s} 2> /dev/null | \
+   ${SSH} -q -$p -F $OBJ/ssh_proxy somehost "cat > ${COPY}"
+   if [ $? -ne 0 ]; then
+   fail "ssh cat $DATA failed"
+--- a/regress/yes-head.sh  2005-11-28 06:41:03.0 +0100
 b/regress/yes-head.sh  2013-02-15 11:55:11.413715068 +0100
+@@ -4,7 +4,7 @@
+ tid="yes pipe head"
+ 
+ for p in 1 2; do
+-  lines=`${SSH} -$p -F $OBJ/ssh_proxy thishost 'sh -c "while true;do echo 
yes;done | _POSIX2_VERSION=199209 head -2000"' | (sleep 3 ; wc -l)`
++  lines=`${SSH} -$p -F $OBJ/ssh_proxy thishost 'sh -c "while true;do echo 
yes;done | _POSIX2_VERSION=199209 head -n 2000"' | (sleep 3 ; wc -l)`
+   if [ $? -ne 0 ]; then
+   fail "yes|head test failed"
+   lines = 0;
+--- a/regress/key-options.sh   2008-07-04 09:08:58.0 +0200
 b/regress/key-options.sh   2013-02-15 12:06:05.109486098 +0100
+@@ -54,7 +54,7 @@
+   fi
+ 
+   sed 's/.*/from="'"$f"'" &/' $origkeys >$authkeys
+-  from=`head -1 $authkeys | cut -f1 -d ' '`
++  from=`head -n 1 $authkeys | cut -f1 -d ' '`
+   verbose "key option proto $p $from"
+   r=`${SSH} -$p -q -F $OBJ/ssh_proxy somehost 'echo true'`
+   if [ "$r" = "true" ]; then
diff --git a/meta/recipes-connectivity/openssh/openssh-6.1p1/run-ptest 
b/meta/recipes-connectivity/openssh/openssh-6.1p1/run-ptest
new file mode 100755
index 000..3e725cf
--- /dev/null
+++ b/meta/recipes-connectivity/openssh/openssh-6.1p1/run-ptest
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+export TEST_SHELL=sh
+
+cd regress
+make -k .OBJDIR=`pwd` .CURDIR=`pwd` tests \
+| sed -e 's/^skipped/SKIP: /g' -e 's/^ok /PASS: /g' -e 
's/^failed/FAIL: /g'
diff --git a/meta/recipes-connectivity/openssh/openssh_6.1p1.bb 
b/meta/recipes-connectivity/openssh/openssh_6.1p1.bb
index 32c3b2c..b2a70b7 100644
--- a/meta/recipes-connectivity/openssh/openssh_6.1p1.bb
+++ b/meta/recipes-connectivity/openssh/openssh_6.1p1.bb
@@ -25,13 +25,15 @@ SRC_URI = 
"ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.
file://ssh_config \
file://init \
file://openssh-CVE-2011-4327.patch \
+   file://add-test-support-for-busybox.patch

[OE-core] [PATCH 4/8] acl: Add ptest

2013-02-19 Thread Björn Stenberg
From: "Rick.Yang" 


Signed-off-by: Björn Stenberg 
---
 meta/recipes-support/attr/acl_2.2.51.bb|   21 
 .../attr/files/add-runtest-target.patch|   26 
 meta/recipes-support/attr/files/run-ptest  |8 ++
 3 files changed, 55 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-support/attr/files/add-runtest-target.patch
 create mode 100644 meta/recipes-support/attr/files/run-ptest

diff --git a/meta/recipes-support/attr/acl_2.2.51.bb 
b/meta/recipes-support/attr/acl_2.2.51.bb
index 1c40b00..92d67e0 100644
--- a/meta/recipes-support/attr/acl_2.2.51.bb
+++ b/meta/recipes-support/attr/acl_2.2.51.bb
@@ -4,3 +4,24 @@ PR = "r3"
 
 SRC_URI[md5sum] = "3fc0ce99dc5253bdcce4c9cd437bc267"
 SRC_URI[sha256sum] = 
"06854521cf5d396801af7e54b9636680edf8064355e51c07657ec7442a185225"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+SRC_URI += "file://add-runtest-target.patch \
+   file://run-ptest \
+  "
+
+inherit ptest
+
+RDEPENDS_${PN}-ptest += "perl \
+ perl-module-filehandle \
+ perl-module-getopt-std \
+ perl-module-posix"
+
+do_install_append() {
+if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ] ; then
+sed -i -e 's/include $(TOPDIR)\/include\/builddefs//g' 
${B}/test/Makefile
+ptest_do_install
+cp -r ${B}/test/ ${D}${PTEST_PATH}/
+fi
+}
diff --git a/meta/recipes-support/attr/files/add-runtest-target.patch 
b/meta/recipes-support/attr/files/add-runtest-target.patch
new file mode 100644
index 000..25fdaca
--- /dev/null
+++ b/meta/recipes-support/attr/files/add-runtest-target.patch
@@ -0,0 +1,26 @@
+From 149c3a4f0ba84b4ff94a52029dc89b887dcb6b8c Mon Sep 17 00:00:00 2001
+From: "Rick.Yang" 
+Date: Mon, 17 Dec 2012 07:27:39 +0100
+Subject: [PATCH] Add runtest target for ptest.
+
+Signed-off-by: Rick.Yang 
+Upstream-status: Pending
+
+---
+ test/Makefile |3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/test/Makefile b/test/Makefile
+index d2baac8..5f52e10 100644
+--- a/test/Makefile
 b/test/Makefile
+@@ -47,4 +47,5 @@ $(ROOT):
+ .PHONY: $(TESTS) $(NFS) $(ROOT)
+ .NOTPARALLEL:
+ 
+-
++runtest-TESTS:
++  perl run $(TESTS)
+-- 
+1.7.5.4
+
diff --git a/meta/recipes-support/attr/files/run-ptest 
b/meta/recipes-support/attr/files/run-ptest
new file mode 100644
index 000..c431f04
--- /dev/null
+++ b/meta/recipes-support/attr/files/run-ptest
@@ -0,0 +1,8 @@
+#!/bin/sh
+#
+#This script is used to run acl test suites
+
+cd ./test/
+
+make -k runtest-TESTS | sed '/commands/d' | sed '/ok\| passed/ s/^/PASS: /g' | 
sed '/error\|fail\|failed[^0]\|ERROR\|FAIL/ s/^/FAIL: /g' | sed 
's/UPATH=\".*\"/UPATH=UTF8-String/g'
+
-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH 3/8] udev: Add ptest

2013-02-19 Thread Björn Stenberg
From: jack zhang 


Signed-off-by: Björn Stenberg 
---
 meta/recipes-core/udev/udev.inc|   19 ++-
 .../recipes-core/udev/udev/add-install-ptest.patch |   60 
 meta/recipes-core/udev/udev/run-ptest  |3 +
 3 files changed, 80 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-core/udev/udev/add-install-ptest.patch
 create mode 100755 meta/recipes-core/udev/udev/run-ptest

diff --git a/meta/recipes-core/udev/udev.inc b/meta/recipes-core/udev/udev.inc
index facad0c..8c26eee 100644
--- a/meta/recipes-core/udev/udev.inc
+++ b/meta/recipes-core/udev/udev.inc
@@ -27,9 +27,12 @@ SRC_URI = 
"${KERNELORG_MIRROR}/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
file://local.rules \
file://udev-cache \
file://udev-cache.default \
-   file://init"
+   file://init \
+   file://add-install-ptest.patch \
+   file://run-ptest \
+  "
 
-inherit autotools pkgconfig update-rc.d
+inherit autotools pkgconfig update-rc.d ptest
 
 # udevd/udevadm -> /sbin/, libudev.so.* -> /lib/
 sbindir = "${base_sbindir}"
@@ -105,3 +108,15 @@ python () {
 if oe.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
 raise bb.parse.SkipPackage("'systemd' in DISTRO_FEATURES")
 }
+
+do_compile_append() {
+if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ]; then
+oe_runmake test-udev
+fi
+}
+
+do_install_append() {
+if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ]; then
+ptest_do_install
+fi
+}
diff --git a/meta/recipes-core/udev/udev/add-install-ptest.patch 
b/meta/recipes-core/udev/udev/add-install-ptest.patch
new file mode 100644
index 000..db6cf17
--- /dev/null
+++ b/meta/recipes-core/udev/udev/add-install-ptest.patch
@@ -0,0 +1,60 @@
+Adjustements for ptest:
+
+- Add 'install-ptest' rule.
+- Print a standard result line for each test.
+- Replace the use of "tree" with "find".
+
+Signed-off-by: Björn Stenberg 
+Upstream-status: Pending
+
+--- a/Makefile.am  2012-03-18 16:28:14.0 +0100
 b/Makefile.am  2013-02-18 10:03:36.531101244 +0100
+@@ -708,3 +708,11 @@
+   for i in src/docs/html/*.{html,css,png}; do echo $$i; kup put $$i 
$$i.sign /pub/linux/utils/kernel/hotplug/libudev/; done
+   for i in src/gudev/docs/html/*.{html,css,png}; do rm -f $$i.sign; gpg 
--armor --detach-sign --output=$$i.sign $$i; done
+   for i in src/gudev/docs/html/*.{html,css,png}; do echo $$i; kup put $$i 
$$i.sign /pub/linux/utils/kernel/hotplug/gudev/; done
++
++install-ptest:
++  install test-udev $(DESTDIR)
++  cp Makefile $(DESTDIR)
++  sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile
++  $(MKDIR_P) $(DESTDIR)/test
++  install $(TESTS) $(DESTDIR)/test
++  tar -C $(DESTDIR)/test/ -xJf $(top_srcdir)/test/sys.tar.xz
+--- a/test/udev-test.pl2012-03-18 16:43:36.0 +0100
 b/test/udev-test.pl2013-02-18 10:31:29.706357321 +0100
+@@ -1459,11 +1459,13 @@
+ print "add: error";
+ if ($rules->{exp_add_error}) {
+ print " as expected\n";
++print "XFAIL: TEST $number: $rules->{desc}: add\n";
+ } else {
+ print "\n";
+-system("tree $udev_root");
++system("find $udev_root");
+ print "\n";
+ $error++;
++print "FAIL: TEST $number: $rules->{desc}: add\n";
+ sleep(1);
+ }
+ }
+@@ -1479,15 +1481,18 @@
+ print "remove:  error";
+ if ($rules->{exp_rem_error}) {
+ print " as expected\n";
++print "XFAIL: TEST $number: $rules->{desc}: remove\n";
+ } else {
+ print "\n";
+-system("tree $udev_root");
++system("find $udev_root");
+ print "\n";
+ $error++;
++print "FAIL: TEST $number: $rules->{desc}: remove\n";
+ sleep(1);
+ }
+ } else {
+ print "remove:  ok\n";
++print "PASS: TEST $number: $rules->{desc}: remove\n";
+ }
+ 
+ print "\n";
diff --git a/meta/recipes-core/udev/udev/run-ptest 
b/meta/recipes-core/udev/udev/run-ptest
new file mode 100755
index 000..6817ef7
--- /dev/null
+++ b/meta/recipes-core/udev/udev/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+make -k check-TESTS
\ No newline at end of file
-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH 2/8] zlib: Add ptest

2013-02-19 Thread Björn Stenberg
From: Anders Roxell 

Signed-off-by: Björn Stenberg 
Signed-off-by: Anders Roxell 
---
 .../zlib/zlib-1.2.7/Makefile-runtests.patch|   38 
 meta/recipes-core/zlib/zlib-1.2.7/run-ptest|7 
 meta/recipes-core/zlib/zlib_1.2.7.bb   |   22 +++
 3 files changed, 67 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-core/zlib/zlib-1.2.7/Makefile-runtests.patch
 create mode 100644 meta/recipes-core/zlib/zlib-1.2.7/run-ptest

diff --git a/meta/recipes-core/zlib/zlib-1.2.7/Makefile-runtests.patch 
b/meta/recipes-core/zlib/zlib-1.2.7/Makefile-runtests.patch
new file mode 100644
index 000..04c55b4
--- /dev/null
+++ b/meta/recipes-core/zlib/zlib-1.2.7/Makefile-runtests.patch
@@ -0,0 +1,38 @@
+Add 'ptest' target to Makefile, to run tests without checking dependencies.
+
+Signed-off-by: Anders Roxell 
+Upstream-Status: Pending
+---
+diff -uNr a/Makefile.in b/Makefile.in
+--- a/Makefile.in  2012-04-23 07:58:06.0 +0200
 b/Makefile.in  2012-10-24 08:24:19.822544837 +0200
+@@ -83,6 +83,9 @@
+ test: all teststatic testshared
+ 
+ teststatic: static
++  @make runteststatic
++
++runteststatic:
+   @TMPST=`mktemp fooXX`; \
+   if echo hello world | ./minigzip | ./minigzip -d && ./example $$TMPST ; 
then \
+ echo '*** zlib test OK ***'; \
+@@ -92,6 +95,9 @@
+   rm -f $$TMPST
+ 
+ testshared: shared
++  @make runtestshared
++
++runtestshared:
+   @LD_LIBRARY_PATH=`pwd`:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
+   LD_LIBRARYN32_PATH=`pwd`:$(LD_LIBRARYN32_PATH) ; export 
LD_LIBRARYN32_PATH; \
+   DYLD_LIBRARY_PATH=`pwd`:$(DYLD_LIBRARY_PATH) ; export 
DYLD_LIBRARY_PATH; \
+@@ -105,6 +111,9 @@
+   rm -f $$TMPSH
+ 
+ test64: all64
++  @make runtest64
++
++runtest64:
+   @TMP64=`mktemp fooXX`; \
+   if echo hello world | ./minigzip64 | ./minigzip64 -d && ./example64 
$$TMP64; then \
+ echo '*** zlib 64-bit test OK ***'; \
diff --git a/meta/recipes-core/zlib/zlib-1.2.7/run-ptest 
b/meta/recipes-core/zlib/zlib-1.2.7/run-ptest
new file mode 100644
index 000..19d9632
--- /dev/null
+++ b/meta/recipes-core/zlib/zlib-1.2.7/run-ptest
@@ -0,0 +1,7 @@
+#!/bin/sh
+FILE=zlib-ptest-$$.log
+make -k runteststatic runtestshared > $FILE
+sed -i -r -e 's/^(\s+\*+ (.+?) test OK \*+)/\1\nPASS: \2/' $FILE
+sed -i -r -e 's/^(\s+\*+ (.+?) test FAILED \*+)/\1\nFAIL: \2/' $FILE
+cat $FILE
+rm -f $FILE
diff --git a/meta/recipes-core/zlib/zlib_1.2.7.bb 
b/meta/recipes-core/zlib/zlib_1.2.7.bb
index 803fec3..61380ec 100644
--- a/meta/recipes-core/zlib/zlib_1.2.7.bb
+++ b/meta/recipes-core/zlib/zlib_1.2.7.bb
@@ -8,20 +8,42 @@ LIC_FILES_CHKSUM = 
"file://zlib.h;beginline=4;endline=23;md5=94d1b5a40dadd127f33
 
 SRC_URI = "http://www.zlib.net/${BPN}-${PV}.tar.bz2 \
file://remove.ldconfig.call.patch \
+   file://Makefile-runtests.patch \
+   file://run-ptest \
"
 SRC_URI[md5sum] = "2ab442d169156f34c379c968f3f482dd"
 SRC_URI[sha256sum] = 
"49e2e9658dfb036900da6ea0267a737fa3c4eee776d378c79d52e9334934"
 
+RDEPENDS_${PN}-ptest += "make"
+RDEPENDS_${PN}-ptest_virtclass-native = ""
+RDEPENDS_${PN}-ptest_virtclass-nativesdk = ""
+
+FILES_${PN}-dbg += "${PTEST_PATH}/.debug"
+
+inherit ptest
+
 do_configure (){
./configure --prefix=${prefix} --shared --libdir=${libdir}
 }
 
 do_compile (){
oe_runmake
+   if [ ${PTEST_ENABLED} = "1" ] ; then
+   oe_runmake static shared
+   fi
 }
 
 do_install() {
oe_runmake DESTDIR=${D} install
+
+   if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ]; then
+   ptest_do_install
+   install ${B}/Makefile   ${D}${PTEST_PATH}
+   install ${B}/example${D}${PTEST_PATH}
+   install ${B}/minigzip   ${D}${PTEST_PATH}
+   install ${B}/examplesh  ${D}${PTEST_PATH}
+   install ${B}/minigzipsh ${D}${PTEST_PATH}
+   fi
 }
 
 BBCLASSEXTEND = "native nativesdk"
-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/8] busybox: Add ptest

2013-02-19 Thread Björn Stenberg
From: Daniel Dai 


Signed-off-by: Björn Stenberg 
---
 meta/recipes-core/busybox/busybox.inc   |2 +-
 meta/recipes-core/busybox/busybox_1.20.2.bb |   10 ++
 meta/recipes-core/busybox/files/run-ptest   |   11 +++
 3 files changed, 22 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-core/busybox/files/run-ptest

diff --git a/meta/recipes-core/busybox/busybox.inc 
b/meta/recipes-core/busybox/busybox.inc
index 972e7d0..bd1581c 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -35,7 +35,7 @@ CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf"
 
 RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc"
 
-inherit cml1 update-rc.d
+inherit cml1 update-rc.d ptest
 
 # internal helper
 def busybox_cfg(feature, features, tokens, cnf, rem):
diff --git a/meta/recipes-core/busybox/busybox_1.20.2.bb 
b/meta/recipes-core/busybox/busybox_1.20.2.bb
index 783261e..b2e5d47 100644
--- a/meta/recipes-core/busybox/busybox_1.20.2.bb
+++ b/meta/recipes-core/busybox/busybox_1.20.2.bb
@@ -28,9 +28,19 @@ SRC_URI = 
"http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://fix-for-spurious-testsuite-failure.patch \
file://busybox-1.20.2-kernel_ver.patch \
file://stat-usr-bin.patch \
+   file://run-ptest \
file://testsuite-du-du-k-works-fix-false-positive.patch"
 
 SRC_URI[tarball.md5sum] = "e025414bc6cd79579cc7a32a45d3ae1c"
 SRC_URI[tarball.sha256sum] = 
"eb13ff01dae5618ead2ef6f92ba879e9e0390f9583bd545d8789d27cf39b6882"
 
 EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} 
SKIP_STRIP=y"
+
+do_install_append () {
+if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ]; then
+ptest_do_install
+cp -r ${B}/testsuite ${D}${PTEST_PATH}/
+cp ${B}/.config  ${D}${PTEST_PATH}/
+ln -s /bin/busybox   ${D}${PTEST_PATH}/busybox
+fi
+}
diff --git a/meta/recipes-core/busybox/files/run-ptest 
b/meta/recipes-core/busybox/files/run-ptest
new file mode 100644
index 000..8eadce9
--- /dev/null
+++ b/meta/recipes-core/busybox/files/run-ptest
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+current_dir="`readlink -f $0`"
+export bindir="`dirname $current_dir`"
+
+cd testsuite
+if [ $? -ne 0 ]; then
+exit 1
+fi
+
+./runtest -v | sed  -e 's/^SKIPPED:/SKIP:/' | sed -e 's/^UNTESTED:/SKIP:/'
-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH 0/8] Ptest additions

2013-02-19 Thread Björn Stenberg
Here is a handful ptest additions for various packages.
Also included is a minor tweak for ptest.bbclass.

Anders Roxell (1):
  zlib: Add ptest

Björn Stenberg (4):
  bzip2: Add ptest
  openssh: Add ptest
  openssl: Add ptest
  ptest: Add missed .debug path

Daniel Dai (1):
  busybox: Add ptest

Rick Yang (1):
  acl: Add ptest

Jack Zhang (1):
  udev: Add ptest

 meta/classes/ptest.bbclass |3 +-
 .../add-test-support-for-busybox.patch |   61 
 .../openssh/openssh-6.1p1/run-ptest|7 ++
 meta/recipes-connectivity/openssh/openssh_6.1p1.bb |   11 +++-
 .../openssl/openssl-1.0.0j/Makefiles-ptest.patch   |   74 
 .../openssl/openssl-1.0.0j/run-ptest   |2 +
 meta/recipes-connectivity/openssl/openssl.inc  |   19 +-
 .../recipes-connectivity/openssl/openssl_1.0.0j.bb |2 +
 meta/recipes-core/busybox/busybox.inc  |2 +-
 meta/recipes-core/busybox/busybox_1.20.2.bb|   10 +++
 meta/recipes-core/busybox/files/run-ptest  |   11 +++
 meta/recipes-core/udev/udev.inc|   19 +-
 .../recipes-core/udev/udev/add-install-ptest.patch |   60 
 meta/recipes-core/udev/udev/run-ptest  |3 +
 .../zlib/zlib-1.2.7/Makefile-runtests.patch|   38 ++
 meta/recipes-core/zlib/zlib-1.2.7/run-ptest|7 ++
 meta/recipes-core/zlib/zlib_1.2.7.bb   |   22 ++
 .../recipes-extended/bzip2/bzip2-1.0.6/Makefile.am |   32 +
 meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest  |2 +
 meta/recipes-extended/bzip2/bzip2_1.0.6.bb |   10 +++-
 meta/recipes-support/attr/acl_2.2.51.bb|   21 ++
 .../attr/files/add-runtest-target.patch|   26 +++
 meta/recipes-support/attr/files/run-ptest  |8 ++
 23 files changed, 443 insertions(+), 7 deletions(-)
 create mode 100644 
meta/recipes-connectivity/openssh/openssh-6.1p1/add-test-support-for-busybox.patch
 create mode 100755 meta/recipes-connectivity/openssh/openssh-6.1p1/run-ptest
 create mode 100644 
meta/recipes-connectivity/openssl/openssl-1.0.0j/Makefiles-ptest.patch
 create mode 100644 meta/recipes-connectivity/openssl/openssl-1.0.0j/run-ptest
 create mode 100644 meta/recipes-core/busybox/files/run-ptest
 create mode 100644 meta/recipes-core/udev/udev/add-install-ptest.patch
 create mode 100755 meta/recipes-core/udev/udev/run-ptest
 create mode 100644 meta/recipes-core/zlib/zlib-1.2.7/Makefile-runtests.patch
 create mode 100644 meta/recipes-core/zlib/zlib-1.2.7/run-ptest
 create mode 100644 meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest
 create mode 100644 meta/recipes-support/attr/files/add-runtest-target.patch
 create mode 100644 meta/recipes-support/attr/files/run-ptest

-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/2 v2] glib-2.0: Fix ptest to build with uclibc.

2013-02-11 Thread Björn Stenberg
Only install eglibc-specific dependencies when building for eglibc.
Tweak a test case that won't build with uclibc.

Signed-off-by: Björn Stenberg 
---
 .../glib-2.0/glib-2.0/fix-conflicting-rand.patch   |   35 
 meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb  |   18 ++
 2 files changed, 46 insertions(+), 7 deletions(-)
 create mode 100644 
meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch

diff --git a/meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch 
b/meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch
new file mode 100644
index 000..1571112
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch
@@ -0,0 +1,35 @@
+Rename 'rand' variable to avoid conflict.
+
+Upstream-Status: pending
+Signed-off-by: Björn Stenberg 
+
+diff -u glib-2.34.3/tests/refcount/signals.c~ 
glib-2.34.3/tests/refcount/signals.c
+--- glib-2.34.3/tests/refcount/signals.c   2012-11-26 17:52:48.0 
+0100
 glib-2.34.3/tests/refcount/signals.c   2013-02-08 14:24:10.052477546 
+0100
+@@ -9,7 +9,7 @@
+ #define MY_IS_TEST_CLASS(tclass)   (G_TYPE_CHECK_CLASS_TYPE ((tclass), 
G_TYPE_TEST))
+ #define MY_TEST_GET_CLASS(test)(G_TYPE_INSTANCE_GET_CLASS ((test), 
G_TYPE_TEST, GTestClass))
+ 
+-static GRand *rand;
++static GRand *grand;
+ 
+ typedef struct _GTest GTest;
+ typedef struct _GTestClass GTestClass;
+@@ -84,7 +84,7 @@
+   NULL
+ };
+ 
+-rand = g_rand_new();
++grand = g_rand_new();
+ 
+ test_type = g_type_register_static (G_TYPE_OBJECT, "GTest",
+ &test_info, 0);
+@@ -218,7 +218,7 @@
+ static void
+ my_test_do_prop (GTest * test)
+ {
+-  test->value = g_rand_int (rand);
++  test->value = g_rand_int (grand);
+   g_object_notify (G_OBJECT (test), "test-prop");
+ }
+ 
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb 
b/meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb
index fe50220..d58d489 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb
@@ -13,6 +13,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz 
\
file://configure-libtool.patch \
file://glib-2.0_fix_for_x32.patch \
file://obsolete_automake_macros.patch \
+   file://fix-conflicting-rand.patch \
file://Makefile-ptest.patch \
file://run-ptest \
   "
@@ -23,6 +24,16 @@ SRC_URI_append_class-native = " 
file://glib-gettextize-dir.patch"
 BBCLASSEXTEND = "native nativesdk"
 
 RDEPENDS_${PN}-ptest += "\
+tzdata \
+tzdata-americas \
+tzdata-asia \
+tzdata-europe \
+tzdata-posix \
+python-pygobject \
+python-dbus \
+   "
+
+RDEPENDS_${PN}-ptest_append_libc-glibc = "\
 eglibc-gconv-utf-16 \
 eglibc-charmap-utf-8 \
 eglibc-gconv-cp1255 \
@@ -31,13 +42,6 @@ RDEPENDS_${PN}-ptest += "\
 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 \
"
 
 do_configure_prepend() {
-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH 2/2] libiconv: Remove RPATH from binaries

2013-02-08 Thread Björn Stenberg
Modify libtool to not add RPATH.
This solves https://bugzilla.yoctoproject.org/show_bug.cgi?id=2669

Signed-off-by: Björn Stenberg 
---
 meta/recipes-support/libiconv/libiconv_1.14.bb |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/meta/recipes-support/libiconv/libiconv_1.14.bb 
b/meta/recipes-support/libiconv/libiconv_1.14.bb
index 866..b1d2612 100644
--- a/meta/recipes-support/libiconv/libiconv_1.14.bb
+++ b/meta/recipes-support/libiconv/libiconv_1.14.bb
@@ -34,6 +34,12 @@ do_configure_prepend () {
rm -f m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 
m4/lt~obsolete.m4 libcharset/m4/libtool.m4 libcharset/m4/ltoptions.m4 
libcharset/m4/ltsugar.m4 libcharset/m4/ltversion.m4 libcharset/m4/lt~obsolete.m4
 }
 
+do_configure_append () {
+# forcibly remove RPATH from libtool
+sed -i 
's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' *libtool
+sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=_NO_RPATH_|g' *libtool
+}
+
 do_install_append () {
rm -rf ${D}${libdir}/preloadable_libiconv.so
rm -rf ${D}${libdir}/charset.alias
-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/2] glib-2.0: Fix ptest to build with uclibc.

2013-02-08 Thread Björn Stenberg
Only install eglibc-specific dependencies when building for eglibc.
Tweak a test case that won't build with uclibc.

Signed-off-by: Björn Stenberg 
---
 .../glib-2.0/glib-2.0/fix-conflicting-rand.patch   |   35 
 meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb  |   18 ++
 2 files changed, 46 insertions(+), 7 deletions(-)
 create mode 100644 
meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch

diff --git a/meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch 
b/meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch
new file mode 100644
index 000..1571112
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch
@@ -0,0 +1,35 @@
+Rename 'rand' variable to avoid conflict with stdlib.h.
+
+Upstream-Status: pending
+Signed-off-by: Björn Stenberg 
+
+diff -u glib-2.34.3/tests/refcount/signals.c~ 
glib-2.34.3/tests/refcount/signals.c
+--- glib-2.34.3/tests/refcount/signals.c   2012-11-26 17:52:48.0 
+0100
 glib-2.34.3/tests/refcount/signals.c   2013-02-08 14:24:10.052477546 
+0100
+@@ -9,7 +9,7 @@
+ #define MY_IS_TEST_CLASS(tclass)   (G_TYPE_CHECK_CLASS_TYPE ((tclass), 
G_TYPE_TEST))
+ #define MY_TEST_GET_CLASS(test)(G_TYPE_INSTANCE_GET_CLASS ((test), 
G_TYPE_TEST, GTestClass))
+ 
+-static GRand *rand;
++static GRand *grand;
+ 
+ typedef struct _GTest GTest;
+ typedef struct _GTestClass GTestClass;
+@@ -84,7 +84,7 @@
+   NULL
+ };
+ 
+-rand = g_rand_new();
++grand = g_rand_new();
+ 
+ test_type = g_type_register_static (G_TYPE_OBJECT, "GTest",
+ &test_info, 0);
+@@ -218,7 +218,7 @@
+ static void
+ my_test_do_prop (GTest * test)
+ {
+-  test->value = g_rand_int (rand);
++  test->value = g_rand_int (grand);
+   g_object_notify (G_OBJECT (test), "test-prop");
+ }
+ 
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb 
b/meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb
index fe50220..d163030 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb
@@ -13,6 +13,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz 
\
file://configure-libtool.patch \
file://glib-2.0_fix_for_x32.patch \
file://obsolete_automake_macros.patch \
+   file://fix-conflicting-rand.patch \
file://Makefile-ptest.patch \
file://run-ptest \
   "
@@ -23,6 +24,16 @@ SRC_URI_append_class-native = " 
file://glib-gettextize-dir.patch"
 BBCLASSEXTEND = "native nativesdk"
 
 RDEPENDS_${PN}-ptest += "\
+tzdata \
+tzdata-americas \
+tzdata-asia \
+tzdata-europe \
+tzdata-posix \
+python-pygobject \
+python-dbus \
+   "
+
+RDEPENDS_${PN}-ptest_libc-eglibc += "\
 eglibc-gconv-utf-16 \
 eglibc-charmap-utf-8 \
 eglibc-gconv-cp1255 \
@@ -31,13 +42,6 @@ RDEPENDS_${PN}-ptest += "\
 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 \
"
 
 do_configure_prepend() {
-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH 0/2] uclibc ptest changes

2013-02-08 Thread Björn Stenberg
glib-2.0 would not build with ptest, due to bad dependencies.

When looking into that, I found that libiconv did not pass the QA RPATH
check so I fixed that too.
(https://bugzilla.yoctoproject.org/show_bug.cgi?id=2669)

Björn Stenberg (2):
  glib-2.0: Fix ptest to build with uclibc.
  libiconv: Remove RPATH from binaries

 .../glib-2.0/glib-2.0/fix-conflicting-rand.patch   |   35 
 meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb  |   18 ++
 meta/recipes-support/libiconv/libiconv_1.14.bb |6 +++
 3 files changed, 52 insertions(+), 7 deletions(-)
 create mode 100644 
meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch

-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 4/8] Revert "Add ptest for glib."

2013-02-08 Thread Björn Stenberg
Bernhard Reutner-Fischer wrote:
> The uncompressed log is about 50MB, i put it here (still 1.2MB):
> http://busybox.net/~aldot/oe/mk.all.20130118-1442.53.log.xz

Can I ask how you worked around the iconv RPATH issue?

https://bugzilla.yoctoproject.org/show_bug.cgi?id=2669

-- 
Björn

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 4/8] Revert "Add ptest for glib."

2013-02-06 Thread Björn Stenberg
Saul Wold wrote:
> >-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 \
> >-   "
> Do you have some time to look at this and see if you can make use of
> TCLIBC to use the correct library and locale package info based on
> which libc is being used?
> 
> I guess you did not originally think about the uclibc case.

Correct, I did not.

The list of packages added by ptest are things that are used by the glib test 
suite. Without this data, some tests will fail.

I'll look into making it more uclibc friendly.

-- 
Björn

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 4/5] Add ptest for dbus.

2012-12-20 Thread Björn Stenberg
Marcin Juszkiewicz wrote:
> ExpansionError: Failure expanding variable RDEPENDS_dbus-lib

Ehm, how embarrassing. I have now posted an updated patch.

-- 
Björn

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH 4/5] Add ptest for dbus.

2012-12-20 Thread Björn Stenberg
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.

Signed-off-by: Björn Stenberg 
---
 meta/recipes-core/dbus/dbus-1.6.4/ptest.patch  |  144 
 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-ptest_1.6.4.bb |   46 ++
 meta/recipes-core/dbus/dbus.inc|2 +
 5 files changed, 221 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-core/dbus/dbus-1.6.4/ptest.patch
 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-ptest_1.6.4.bb

diff --git a/meta/recipes-core/dbus/dbus-1.6.4/ptest.patch 
b/meta/recipes-core/dbus/dbus-1.6.4/ptest.patch
new file mode 100644
index 000..106bfb4
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-1.6.4/ptest.patch
@@ -0,0 +1,144 @@
+Add install-ptest rules.
+Change TEST_ENVIRONMENT to allow running outside build dir.
+
+ Makefile.am|7 +++
+ bus/Makefile.am|6 ++
+ dbus/Makefile.am   |6 ++
+ doc/Makefile.am|4 
+ test/Makefile.am   |   25 -
+ test/name-test/Makefile.am |9 +
+ tools/Makefile.am  |   12 
+ 7 files changed, 64 insertions(+), 5 deletions(-)
+
+Signed-off-by: Björn Stenberg 
+Upstream-Status: Pending
+
+diff -ur a/Makefile.am b/Makefile.am
+--- a/Makefile.am  2012-12-06 14:34:01.157414449 +0100
 b/Makefile.am  2012-12-06 15:21:14.447113035 +0100
+@@ -30,4 +30,11 @@
+ 
+ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
+ 
++if DBUS_BUILD_TESTS
++install-ptest:
++  @for subdir in $(SUBDIRS); do \
++  $(MAKE) -C $$subdir DESTDIR=$(DESTDIR)/$$subdir $@; \
++  done
++endif
++
+ include tools/lcov.am
+diff -ur a/bus/Makefile.am b/bus/Makefile.am
+--- a/bus/Makefile.am  2012-12-06 14:34:01.169413931 +0100
 b/bus/Makefile.am  2012-12-06 15:21:14.463112346 +0100
+@@ -290,3 +290,9 @@
+  Extra dist
+ 
+ EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES)
++
++if DBUS_BUILD_TESTS
++install-ptest:
++  @$(MKDIR_P) $(DESTDIR)
++  @install $(dbus_daemon_exec_PROGRAMS) $(noinst_PROGRAMS) $(DESTDIR)
++endif
+diff -ur a/dbus/Makefile.am b/dbus/Makefile.am
+--- a/dbus/Makefile.am 2012-12-06 14:34:01.161414276 +0100
 b/dbus/Makefile.am 2012-12-06 15:21:14.451112862 +0100
+@@ -310,3 +310,9 @@
+ update-systemd:
+   curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.c > 
sd-daemon.c
+   curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.h > 
sd-daemon.h
++
++if DBUS_BUILD_TESTS
++install-ptest:
++  @$(MKDIR_P) $(DESTDIR)
++  @install $(noinst_PROGRAMS) $(DESTDIR)
++endif
+diff -ur a/test/Makefile.am b/test/Makefile.am
+--- a/test/Makefile.am 2012-12-06 14:34:01.165414103 +0100
 b/test/Makefile.am 2012-12-06 15:21:14.455112690 +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
+@@ -325,3 +326,18 @@
+ data/valid-config-files/system.conf: $(top_builddir)/bus/system.conf
+   $(AM_V_at)$(MKDIR_P) data/valid-config-files
+   $(AM_V_GEN)cp $< $@
++
++if DBUS_BUILD_TESTS
++install-ptest: install-ptest-nonrecursive
++  @for subdir in $(SUBDIRS); do \
++  if [ $$subdir != "." ]; then \
++  $(MAKE) -C $$subdir DESTDIR=$(DESTDIR)/$$subdir $@; \
++  fi; \
++  done
++
++install-ptest-nonrecursive:
++  @$(MKDIR_P) $(DESTDIR)/data/valid-config-files/session.d
++  @for file in Makefile $(installable_tests) $(EXTRA_DIST) 
$(noinst_DATA); do \
++  install -D $${file%.in} $(DESTDIR)/$${file%.in}; \
++  done;
++endif
+diff -ur a/test/name-test/Makefile.am b/test/name-test/Makefile.am
+--- a/test/name-test/Makefile.am   2012-12-06 14:34:01.169413931 +0100
 b/test/name-test/Makefile.am   2012-12-06 15:21:14.459112518 +0100
+@@ -36,4 +36,13 @@
+ test_privserver_client_LDADD=../libdbus-testutils.la
+ test_autolaunch_LDADD=../libdbus-testutils.la
+ 
++install-ptest:
++  @$(MKDIR_P) $(DESTDIR)
+

[OE-core] [PATCH 2/5] New package: ptest-runner

2012-12-19 Thread Björn Stenberg
This package contains 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 
---
 .../ptest-runner/files/ptest-runner|   16 
 .../ptest-runner/ptest-runner_1.0.bb   |   17 +
 2 files changed, 33 insertions(+), 0 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/recipes-support/ptest-runner/files/ptest-runner 
b/meta/recipes-support/ptest-runner/files/ptest-runner
new file mode 100644
index 000..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 000..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


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH 5/5] Add ptest for bash.

2012-12-19 Thread Björn Stenberg
Signed-off-by: Björn Stenberg 
---
 .../bash/bash-4.2/build-tests.patch|   48 
 meta/recipes-extended/bash/bash-4.2/run-ptest  |2 +
 .../bash/bash-4.2/test-output.patch|   25 ++
 meta/recipes-extended/bash/bash.inc|   16 ++-
 meta/recipes-extended/bash/bash_4.2.bb |3 +
 5 files changed, 93 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-extended/bash/bash-4.2/build-tests.patch
 create mode 100644 meta/recipes-extended/bash/bash-4.2/run-ptest
 create mode 100644 meta/recipes-extended/bash/bash-4.2/test-output.patch

diff --git a/meta/recipes-extended/bash/bash-4.2/build-tests.patch 
b/meta/recipes-extended/bash/bash-4.2/build-tests.patch
new file mode 100644
index 000..0360881
--- /dev/null
+++ b/meta/recipes-extended/bash/bash-4.2/build-tests.patch
@@ -0,0 +1,48 @@
+Add 'ptest' target to Makefile, to run tests without checking dependencies.
+
+Signed-off-by: Anders Roxell 
+Upstream-Status: Pending
+---
+diff -uNr a/Makefile.in b/Makefile.in
+--- a/Makefile.in  2012-11-06 08:40:07.552403063 +0100
 b/Makefile.in  2012-11-06 11:13:36.958297555 +0100
+@@ -827,20 +827,34 @@
+   fi
+ 
+ recho$(EXEEXT):   $(SUPPORT_SRC)recho.c
+-  @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)recho.c 
${LIBS_FOR_BUILD}
++  @$(CC) $(CCFLAGS) -o $@ $<
+ 
+ zecho$(EXEEXT):   $(SUPPORT_SRC)zecho.c
+-  @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)zecho.c 
${LIBS_FOR_BUILD}
++  @$(CC) $(CCFLAGS) -o $@ $<
+ 
+ printenv$(EXEEXT):$(SUPPORT_SRC)printenv.c
+-  @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)printenv.c 
${LIBS_FOR_BUILD}
++  @$(CC) $(CCFLAGS) -o $@ $<
+ 
+ xcase$(EXEEXT):   $(SUPPORT_SRC)xcase.c
+-  @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)xcase.c 
${LIBS_FOR_BUILD}
++  @$(CC) $(CCFLAGS) -o $@ $<
+ 
+-test tests check: force $(Program) $(TESTS_SUPPORT)
++test tests check:
++  @$(MAKE) install-test
++  @$(MAKE) runtest
++
++install-test: buildtest
++ifeq ($(origin INSTALL_TEST_DIR), undefined)
+   @-test -d tests || mkdir tests
+   @cp $(TESTS_SUPPORT) tests
++else
++  @-test -d $(INSTALL_TEST_DIR) || mkdir -p $(INSTALL_TEST_DIR)
++  @cp -r $(srcdir)/tests/* $(INSTALL_TEST_DIR)/
++  @cp $(TESTS_SUPPORT) $(INSTALL_TEST_DIR)
++endif
++
++buildtest: force $(Program) $(TESTS_SUPPORT)
++
++runtest:
+   @( cd $(srcdir)/tests && \
+   PATH=$(BUILD_DIR)/tests:$$PATH THIS_SH=$(THIS_SH) $(SHELL) 
${TESTSCRIPT} )
+ 
diff --git a/meta/recipes-extended/bash/bash-4.2/run-ptest 
b/meta/recipes-extended/bash/bash-4.2/run-ptest
new file mode 100644
index 000..66f1eee
--- /dev/null
+++ b/meta/recipes-extended/bash/bash-4.2/run-ptest
@@ -0,0 +1,2 @@
+#!/bin/sh
+echo Makefile: | make -f Makefile -f - -k THIS_SH=/bin/bash BUILD_DIR=. runtest
diff --git a/meta/recipes-extended/bash/bash-4.2/test-output.patch 
b/meta/recipes-extended/bash/bash-4.2/test-output.patch
new file mode 100644
index 000..7d0ce63
--- /dev/null
+++ b/meta/recipes-extended/bash/bash-4.2/test-output.patch
@@ -0,0 +1,25 @@
+Add FAIL/PASS output to test output.
+
+Signed-off-by: Björn Stenberg 
+Upstream-status: Pending
+---
+diff -uNr a/tests/run-all b/tests/run-all
+--- a/tests/run-all1999-10-08 17:07:46.0 +0200
 b/tests/run-all2012-10-27 21:04:18.663331887 +0200
+@@ -22,7 +22,15 @@
+   case $x in
+   $0|run-minimal|run-gprof)   ;;
+   *.orig|*~) ;;
+-  *)  echo $x ; sh $x ;;
++*)  echo $x
++ output=`sh $x`
++ if [ -n "$output" ]; then
++ echo "$output"
++ echo "FAIL: $x"
++ else
++ echo "PASS: $x"
++ fi
++ ;;
+   esac
+ done
+ 
diff --git a/meta/recipes-extended/bash/bash.inc 
b/meta/recipes-extended/bash/bash.inc
index f1de931..20a23f0 100644
--- a/meta/recipes-extended/bash/bash.inc
+++ b/meta/recipes-extended/bash/bash.inc
@@ -4,7 +4,7 @@ SECTION = "base/shell"
 
 DEPENDS = "ncurses bison-native"
 
-inherit autotools gettext update-alternatives
+inherit autotools gettext update-alternatives ptest
 
 PARALLEL_MAKE = ""
 
@@ -17,18 +17,32 @@ ALTERNATIVE_PRIORITY = "100"
 
 export AUTOHEADER = "true"
 
+RDEPENDS_${PN}-ptest += "make"
+
 do_configure_prepend () {
if [ ! -e acinclude.m4 ]; then
cat aclocal.m4 > acinclude.m4
fi
 }
 
+do_compile_append () {
+if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ]; then
+oe_runmake buildtest
+fi
+}
+
 do_install_append () {
# Move /usr/bin/bash to /bin/bash, if need
if [ "${base_bindir}" != "${bindir}" ]; then
mkdir -p ${

[OE-core] [PATCH 0/5] ptest update

2012-12-19 Thread Björn Stenberg
Here is an update of the ptest patch set.

The variables are now moved from bitbake.conf to a new ptest.bbclass, which
packages inherit to create a ptest package.

I have added patches for bash in this set, so it now includes ptest for
glib, dbus and bash. The do_install bits are also much cleaner now.

Björn Stenberg (5):
  Add a new distro feature "ptest".
  New package: ptest-runner
  Add ptest for glib.
  Add ptest for dbus.
  Add ptest for bash.

 meta/classes/image.bbclass |6 +-
 meta/classes/packagegroup.bbclass  |2 +-
 meta/classes/ptest.bbclass |   34 +
 meta/recipes-core/dbus/dbus-1.6.4/ptest.patch  |  144 
 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-ptest_1.6.4.bb |   46 ++
 meta/recipes-core/dbus/dbus.inc|2 +
 .../glib-2.0/glib-2.0/Makefile-ptest.patch |   61 
 meta/recipes-core/glib-2.0/glib-2.0/run-ptest  |3 +
 meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb  |   25 +++-
 meta/recipes-core/glib-2.0/glib.inc|7 +-
 .../automake/automake/buildtest.patch  |   33 +
 meta/recipes-devtools/automake/automake_1.12.5.bb  |3 +-
 .../bash/bash-4.2/build-tests.patch|   48 +++
 meta/recipes-extended/bash/bash-4.2/run-ptest  |2 +
 .../bash/bash-4.2/test-output.patch|   25 
 meta/recipes-extended/bash/bash.inc|   16 ++-
 meta/recipes-extended/bash/bash_4.2.bb |3 +
 .../ptest-runner/files/ptest-runner|   16 ++
 .../ptest-runner/ptest-runner_1.0.bb   |   17 +++
 21 files changed, 512 insertions(+), 10 deletions(-)
 create mode 100644 meta/classes/ptest.bbclass
 create mode 100644 meta/recipes-core/dbus/dbus-1.6.4/ptest.patch
 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-ptest_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-extended/bash/bash-4.2/build-tests.patch
 create mode 100644 meta/recipes-extended/bash/bash-4.2/run-ptest
 create mode 100644 meta/recipes-extended/bash/bash-4.2/test-output.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


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH 3/5] Add ptest for glib.

2012-12-19 Thread Björn Stenberg

Signed-off-by: Björn Stenberg 
---
 .../glib-2.0/glib-2.0/Makefile-ptest.patch |   61 
 meta/recipes-core/glib-2.0/glib-2.0/run-ptest  |3 +
 meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb  |   25 +++-
 meta/recipes-core/glib-2.0/glib.inc|7 +-
 4 files changed, 91 insertions(+), 5 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 000..cb36c09
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/Makefile-ptest.patch
@@ -0,0 +1,61 @@
+Add 'ptest' target to Makefile, to run tests without checking dependencies.
+Add 'install-ptest' target, to copy needed files to ptest dir.
+
+Signed-off-by: Björn Stenberg 
+Upstream-status: Pending
+---
+ Makefile.decl |   43 +++
+ 1 file changed, 43 insertions(+)
+
+--- a/Makefile.decl2012-03-12 01:42:39.0 +0100
 b/Makefile.decl2012-11-26 13:42:08.436865192 +0100
+@@ -25,6 +25,49 @@
+ test-nonrecursive:
+ endif
+ 
++ptest: ptest-nonrecursive
++  @ 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}
++
++install-ptest: install-ptest-nonrecursive
++  @test -z "$(SUBDIRS)" || for subdir in $(SUBDIRS); do \
++  test "$$subdir" == "." || \
++  (cd $$subdir && $(MAKE) DESTDIR=$(DESTDIR)/$$subdir $@ ) \
++  done
++
++# install files used for ptest:
++# - copy EXTRA_DIST (for test data in glib/tests)
++# - run dist-hook (for glib/tests/bookmarks/ and glib/tests/markups)
++# - copy TEST_PROGS (the test programs)
++# - copy INSTALL_PROGS (for glib/gtester)
++# - avoid libtool wrappers by copying binaries from .libs
++# - strip Makefile: target from all Makefiles
++install-ptest-nonrecursive:
++  @mkdir -p $(DESTDIR)
++  @if [ -n "${TEST_PROGS}" ]; then \
++  if [ -n "${EXTRA_DIST}" ]; then \
++  cp ${EXTRA_DIST} $(DESTDIR); \
++  fi; \
++  grep -q dist-hook: Makefile && \
++  $(MAKE) distdir=$(DESTDIR) dist-hook; \
++  if [ -d .libs ] ; then \
++  cd .libs; \
++  fi; \
++  cp ${TEST_PROGS} $(DESTDIR); \
++  fi;
++  @if [ -n "${INSTALL_PROGS}" ]; then \
++  if [ -d .libs ]  ; then \
++  cd .libs; \
++  fi; \
++  cp ${INSTALL_PROGS} $(DESTDIR); \
++  fi
++  @test -f Makefile && sed 's/^Makefile:/_Makefile:/' $(DESTDIR)/Makefile
++
+ # 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 000..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.34.3.bb 
b/meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb
index 966a851..9854585 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb
@@ -12,6 +12,8 @@ SHRT_VER = 
"${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]
 SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
file://configure-libtool.patch \
file://glib-2.0_fix_for_x32.patch \
+   file://Makefile-ptest.patch \
+   file://run-ptest \
   "
 SRC_URI[md5sum] = "a4ca31e258273c3761e3de2edd607661"
 SRC_URI[sha256sum] = 
"855fcbf87cb93065b488358e351774d8a39177281023bae58c286f41612658a7"
@@ -19,6 +21,24 @@ SRC_URI[sha256sum] = 
"855fcbf87cb93065b488358e351774d8a39177281023bae58c286f4161
 SRC_URI_append_class-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-trans

[OE-core] [PATCH 1/5] Add a new distro feature "ptest".

2012-12-19 Thread Björn Stenberg
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//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 
---
 meta/classes/image.bbclass |6 ++-
 meta/classes/packagegroup.bbclass  |2 +-
 meta/classes/ptest.bbclass |   34 
 .../automake/automake/buildtest.patch  |   33 +++
 meta/recipes-devtools/automake/automake_1.12.5.bb  |3 +-
 5 files changed, 74 insertions(+), 4 deletions(-)
 create mode 100644 meta/classes/ptest.bbclass
 create mode 100644 meta/recipes-devtools/automake/automake/buildtest.patch

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 719d871..9bc5d31 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 fc67302..af6ee5d 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/classes/ptest.bbclass b/meta/classes/ptest.bbclass
new file mode 100644
index 000..8bde489
--- /dev/null
+++ b/meta/classes/ptest.bbclass
@@ -0,0 +1,34 @@
+# Ptest packages are built indirectly by a distro_feature,
+# no need for them to be a direct target of 'world'
+EXCLUDE_FROM_WORLD = "1"
+
+SUMMARY_${PN}-ptest ?= "${SUMMARY} - Package test files"
+DESCRIPTION_${PN}-ptest ?= "${DESCRIPTION}  \
+This package contains a test directory ${PTEST_PATH} for package test 
purposes."
+
+PTEST_PATH ?= "${libdir}/${PN}/ptest"
+FILES_${PN}-ptest = "${PTEST_PATH}/*"
+SECTION_${PN}-ptest = "devel"
+ALLOW_EMPTY_${PN}-ptest = "1"
+PTEST_ENABLED = "${@base_contains("DISTRO_FEATURES", "ptest", "1", "0", d)}"
+RDEPENDS_${PN}-ptest_virtclass-native = ""
+RDEPENDS_${PN}-ptest_virtclass-nativesdk = ""
+
+PACKAGES += "${PN}-ptest"
+
+FILES_${PN}-dbg += "${PTEST_PATH}/*/.debug \
+${PTEST_PATH}/*/*/.debug \
+${PTEST_PATH}/*/*/*/.debug \
+${PTEST_PATH}/*/*/*/*/.debug \
+   "
+
+ptest_do_install() {
+if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ]; then
+install -D ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/run-ptest
+if grep -q install-ptest: Makefile; then
+oe_runmake DESTDIR=${D}${PTEST_PATH} install-ptest
+fi
+fi
+}
+
+EXPORT_FUNCTION

[OE-core] [PATCH 4/5] Add ptest for dbus.

2012-12-19 Thread Björn Stenberg
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.

Signed-off-by: Björn Stenberg 
---
 meta/recipes-core/dbus/dbus-1.6.4/ptest.patch  |  144 
 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-ptest_1.6.4.bb |   46 ++
 meta/recipes-core/dbus/dbus.inc|2 +
 5 files changed, 221 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-core/dbus/dbus-1.6.4/ptest.patch
 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-ptest_1.6.4.bb

diff --git a/meta/recipes-core/dbus/dbus-1.6.4/ptest.patch 
b/meta/recipes-core/dbus/dbus-1.6.4/ptest.patch
new file mode 100644
index 000..106bfb4
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-1.6.4/ptest.patch
@@ -0,0 +1,144 @@
+Add install-ptest rules.
+Change TEST_ENVIRONMENT to allow running outside build dir.
+
+ Makefile.am|7 +++
+ bus/Makefile.am|6 ++
+ dbus/Makefile.am   |6 ++
+ doc/Makefile.am|4 
+ test/Makefile.am   |   25 -
+ test/name-test/Makefile.am |9 +
+ tools/Makefile.am  |   12 
+ 7 files changed, 64 insertions(+), 5 deletions(-)
+
+Signed-off-by: Björn Stenberg 
+Upstream-Status: Pending
+
+diff -ur a/Makefile.am b/Makefile.am
+--- a/Makefile.am  2012-12-06 14:34:01.157414449 +0100
 b/Makefile.am  2012-12-06 15:21:14.447113035 +0100
+@@ -30,4 +30,11 @@
+ 
+ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
+ 
++if DBUS_BUILD_TESTS
++install-ptest:
++  @for subdir in $(SUBDIRS); do \
++  $(MAKE) -C $$subdir DESTDIR=$(DESTDIR)/$$subdir $@; \
++  done
++endif
++
+ include tools/lcov.am
+diff -ur a/bus/Makefile.am b/bus/Makefile.am
+--- a/bus/Makefile.am  2012-12-06 14:34:01.169413931 +0100
 b/bus/Makefile.am  2012-12-06 15:21:14.463112346 +0100
+@@ -290,3 +290,9 @@
+  Extra dist
+ 
+ EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES)
++
++if DBUS_BUILD_TESTS
++install-ptest:
++  @$(MKDIR_P) $(DESTDIR)
++  @install $(dbus_daemon_exec_PROGRAMS) $(noinst_PROGRAMS) $(DESTDIR)
++endif
+diff -ur a/dbus/Makefile.am b/dbus/Makefile.am
+--- a/dbus/Makefile.am 2012-12-06 14:34:01.161414276 +0100
 b/dbus/Makefile.am 2012-12-06 15:21:14.451112862 +0100
+@@ -310,3 +310,9 @@
+ update-systemd:
+   curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.c > 
sd-daemon.c
+   curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.h > 
sd-daemon.h
++
++if DBUS_BUILD_TESTS
++install-ptest:
++  @$(MKDIR_P) $(DESTDIR)
++  @install $(noinst_PROGRAMS) $(DESTDIR)
++endif
+diff -ur a/test/Makefile.am b/test/Makefile.am
+--- a/test/Makefile.am 2012-12-06 14:34:01.165414103 +0100
 b/test/Makefile.am 2012-12-06 15:21:14.455112690 +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
+@@ -325,3 +326,18 @@
+ data/valid-config-files/system.conf: $(top_builddir)/bus/system.conf
+   $(AM_V_at)$(MKDIR_P) data/valid-config-files
+   $(AM_V_GEN)cp $< $@
++
++if DBUS_BUILD_TESTS
++install-ptest: install-ptest-nonrecursive
++  @for subdir in $(SUBDIRS); do \
++  if [ $$subdir != "." ]; then \
++  $(MAKE) -C $$subdir DESTDIR=$(DESTDIR)/$$subdir $@; \
++  fi; \
++  done
++
++install-ptest-nonrecursive:
++  @$(MKDIR_P) $(DESTDIR)/data/valid-config-files/session.d
++  @for file in Makefile $(installable_tests) $(EXTRA_DIST) 
$(noinst_DATA); do \
++  install -D $${file%.in} $(DESTDIR)/$${file%.in}; \
++  done;
++endif
+diff -ur a/test/name-test/Makefile.am b/test/name-test/Makefile.am
+--- a/test/name-test/Makefile.am   2012-12-06 14:34:01.169413931 +0100
 b/test/name-test/Makefile.am   2012-12-06 15:21:14.459112518 +0100
+@@ -36,4 +36,13 @@
+ test_privserver_client_LDADD=../libdbus-testutils.la
+ test_autolaunch_LDADD=../libdbus-testutils.la
+ 
++install-ptest:
++  @$(MKDIR_P) $(DESTDIR)
+

Re: [OE-core] [PATCH 0/4] Pacage Updates

2012-12-05 Thread Björn Stenberg
Radu Moisan wrote:
>   curl: upgrade to 7.27.0

I guess 7.27.0 is better than the current 7.26.0, but wouldn't it make more 
sense to upgrade to the latest version 7.28.1? There has been a lot of bug 
fixes since 7.27.0.

-- 
Björn

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/4] Add a new distro feature "ptest".

2012-12-05 Thread Björn Stenberg
Richard Purdie wrote:
> So I think my proposal stands, lets put the pieces from bitbake.conf
> into a bbclass file for now, the other pieces can merge into the core
> code.

Fair enough. I'll get a new patch set together.

-- 
Björn

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/4] Add a new distro feature "ptest".

2012-11-29 Thread Björn Stenberg
Richard Purdie wrote:
> >  meta/classes/image.bbclass |6 ++-
> >  meta/classes/packagegroup.bbclass  |2 +-
> >  meta/conf/bitbake.conf |   15 -
> 
> Whilst we're in bootstrapping mode for this work, how about we make
> these changes a "ptest.bbclass" file which we'd inherit in the recipes
> where we've got ptest enabled?

Having looked into it a bit, I'm not sure I understand how you mean.

First, I don't quite see how this would be done in an elegant way for the 
in-function changes in image.bbclass and packagegroup.bbclass. 

And the lines added to bitbake.conf were put there because they mirror other 
complementary packages like -dbg and -dev. Is it really a good idea to invent a 
new way of doing this for -ptest packages?

-- 
Björn

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/4] Add a new distro feature "ptest".

2012-11-28 Thread Björn Stenberg
Richard Purdie wrote:
> Whilst we're in bootstrapping mode for this work, how about we make
> these changes a "ptest.bbclass" file which we'd inherit in the recipes
> where we've got ptest enabled?

Ok. I'll give it a go and see how it turns out.

-- 
Björn

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH 3/4] Add ptest for glib.

2012-11-28 Thread Björn Stenberg
Moved install logic from recipe to makefiles.

Signed-off-by: Björn Stenberg 
---
 .../glib-2.0/glib-2.0/Makefile-ptest.patch |   61 
 meta/recipes-core/glib-2.0/glib-2.0/run-ptest  |3 +
 meta/recipes-core/glib-2.0/glib-2.0_2.34.1.bb  |   40 +
 meta/recipes-core/glib-2.0/glib.inc|5 +-
 4 files changed, 107 insertions(+), 2 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 000..a6cc719
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/Makefile-ptest.patch
@@ -0,0 +1,61 @@
+Add 'ptest' target to Makefile, to run tests without checking dependencies.
+Add 'install-ptest' target, to copy needed files to ptest dir.
+
+Signed-off-by: Björn Stenberg 
+Upstream-status: Pending
+---
+ Makefile.decl |   43 +++
+ 1 file changed, 43 insertions(+)
+
+--- a/Makefile.decl2012-03-12 01:42:39.0 +0100
 b/Makefile.decl2012-11-26 13:42:08.436865192 +0100
+@@ -25,6 +25,49 @@
+ test-nonrecursive:
+ endif
+ 
++ptest: ptest-nonrecursive
++  @ 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}
++
++install-ptest: install-ptest-nonrecursive
++  @test -z "$(SUBDIRS)" || for subdir in $(SUBDIRS); do \
++  test "$$subdir" == "." || \
++  (cd $$subdir && $(MAKE) PTESTDIR=$(PTESTDIR)/$$subdir $@ ) \
++  done
++
++# install files used for ptest:
++# - copy EXTRA_DIST (for test data in glib/tests)
++# - run dist-hook (for glib/tests/bookmarks/ and glib/tests/markups)
++# - copy TEST_PROGS (the test programs)
++# - copy INSTALL_PROGS (for glib/gtester)
++# - avoid libtool wrappers by copying binaries from .libs
++# - strip Makefile: target from all Makefiles
++install-ptest-nonrecursive:
++  @mkdir -p $(PTESTDIR)
++  @if [ -n "${TEST_PROGS}" ]; then \
++  if [ -n "${EXTRA_DIST}" ]; then \
++  cp ${EXTRA_DIST} $(PTESTDIR); \
++  fi; \
++  grep -q dist-hook: Makefile && \
++  $(MAKE) distdir=$(PTESTDIR) dist-hook; \
++  if [ -d .libs ] ; then \
++  cd .libs; \
++  fi; \
++  cp ${TEST_PROGS} $(PTESTDIR); \
++  fi;
++  @if [ -n "${INSTALL_PROGS}" ]; then \
++  if [ -d .libs ]  ; then \
++  cd .libs; \
++  fi; \
++  cp ${INSTALL_PROGS} $(PTESTDIR); \
++  fi
++  @test -f Makefile && sed 's/^Makefile:/_Makefile:/' $(PTESTDIR)/Makefile
++
+ # 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 000..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.34.1.bb 
b/meta/recipes-core/glib-2.0/glib-2.0_2.34.1.bb
index 18a155d..9b51c56 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.34.1.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.34.1.bb
@@ -12,6 +12,8 @@ SHRT_VER = 
"${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]
 SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
file://configure-libtool.patch \
file://glib-2.0_fix_for_x32.patch \
+   file://Makefile-ptest.patch \
+   file://run-ptest \
   "
 SRC_URI[md5sum] = "ee779493b083be9348a841e0a51f1b27"
 SRC_URI[sha256sum] = 
"6e84dc9d84b104725b34d255421ed7ac3629e49f437d37addde5ce3891c2e2f1"
@@ -19,6 +21,38 @@ SRC_URI[sha256sum] = 
"6e84dc9d84b104725b34d255421ed7ac3629e49f437d37addde5ce3891
 SRC_URI_append_class-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-

[OE-core] [PATCH 2/4] New package: ptest-runner

2012-11-22 Thread Björn Stenberg
This package contains 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 
---
 .../ptest-runner/files/ptest-runner|   16 
 .../ptest-runner/ptest-runner_1.0.bb   |   17 +
 2 files changed, 33 insertions(+), 0 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/recipes-support/ptest-runner/files/ptest-runner 
b/meta/recipes-support/ptest-runner/files/ptest-runner
new file mode 100644
index 000..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 000..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


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH 3/4] Add ptest for glib.

2012-11-22 Thread Björn Stenberg
Signed-off-by: Björn Stenberg 
---
 .../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.34.1.bb  |   57 
 meta/recipes-core/glib-2.0/glib.inc|5 +-
 4 files changed, 93 insertions(+), 2 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 000..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 
+Upstream-status: Pending
+---
+ Makefile.decl |   13 +
+ 1 file changed, 13 insertions(+)
+
+--- a/Makefile.decl2012-03-12 01:42:39.0 +0100
 b/Makefile.decl2012-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 000..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.34.1.bb 
b/meta/recipes-core/glib-2.0/glib-2.0_2.34.1.bb
index 18a155d..dd4674b 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.34.1.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.34.1.bb
@@ -12,6 +12,8 @@ SHRT_VER = 
"${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]
 SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
file://configure-libtool.patch \
file://glib-2.0_fix_for_x32.patch \
+   file://Makefile-ptest.patch \
+   file://run-ptest \
   "
 SRC_URI[md5sum] = "ee779493b083be9348a841e0a51f1b27"
 SRC_URI[sha256sum] = 
"6e84dc9d84b104725b34d255421ed7ac3629e49f437d37addde5ce3891c2e2f1"
@@ -19,6 +21,38 @@ SRC_URI[sha256sum] = 
"6e84dc9d84b104725b34d255421ed7ac3629e49f437d37addde5ce3891
 SRC_URI_append_class-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 '1s,#!.*,#!${USRBINPATH}/env python,' 
${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in
 }
@@ -36,4 +70,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 s

[OE-core] [PATCH 1/4] Add a new distro feature "ptest".

2012-11-22 Thread Björn Stenberg
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//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 
---
 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 7b24e4e..b574545 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 450a0ee..d86e999 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -224,6 +224,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 a test directory ${PTEST_PATH} for package test 
purposes."
+
 SUMMARY_${PN}-dev ?= "${SUMMARY} - Development files"
 DESCRIPTION_${PN}-dev ?= "${DESCRIPTION}  \
 This package contains symbolic links, header files, and \
@@ -267,7 +271,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 = ""
 
@@ -312,6 +316,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(&

[OE-core] [PATCH 0/4] ptest for master

2012-11-22 Thread Björn Stenberg
Hi all.

[Repeating the description here for completeness.]

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 "master" branch.

Björn Stenberg (4):
  Add a new distro feature "ptest".
  New package: ptest-runner
  Add ptest package 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.34.1.bb  |   57 +
 meta/recipes-core/glib-2.0/glib.inc|5 +-
 .../automake/automake/buildtest.patch  |   33 
 meta/recipes-devtools/automake/automake_1.12.3.bb  |3 +-
 .../ptest-runner/files/ptest-runner|   16 
 .../ptest-runner/ptest-runner_1.0.bb   |   17 
 15 files changed, 296 insertions(+), 7 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


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH 4/4] Add ptest for dbus.

2012-11-22 Thread Björn Stenberg
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 
---
 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 000..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 000..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 
+Upstream-Status: Pending
+
+--- a/test/Makefile.am 2012-06-15 15:25:43.0 +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 000..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

Re: [OE-core] [PATCH 0/4] RFC: ptest for danny

2012-11-22 Thread Björn Stenberg
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

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 0/4] RFC: ptest for danny

2012-11-22 Thread Björn Stenberg
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

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 0/4] RFC: ptest for danny

2012-11-22 Thread Björn Stenberg
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

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH 0/4] RFC: ptest for danny

2012-11-21 Thread Björn Stenberg
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


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH 3/4] Add ptest for glib-2.0.

2012-11-21 Thread Björn Stenberg
Signed-off-by: Björn Stenberg 
---
 .../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 000..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 
+Upstream-status: Pending
+---
+ Makefile.decl |   13 +
+ 1 file changed, 13 insertions(+)
+
+--- a/Makefile.decl2012-03-12 01:42:39.0 +0100
 b/Makefile.decl2012-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 000..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

[OE-core] [PATCH 1/4] Add a new distro feature "ptest"

2012-11-21 Thread Björn Stenberg
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//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 
---
 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_c

[OE-core] [PATCH 4/4] Add ptest for dbus.

2012-11-21 Thread Björn Stenberg
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 
---
 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 000..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 000..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 
+Upstream-Status: Pending
+
+--- a/test/Makefile.am 2012-06-15 15:25:43.0 +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 000..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

[OE-core] [PATCH 2/4] New recipe: ptest-runner

2012-11-21 Thread Björn Stenberg
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 
---
 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 000..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 000..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


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/4] gcc: Switch SRC_URI to use svn

2012-09-13 Thread Björn Stenberg
Khem Raj wrote:
> I agree but then 1.7 GB is noticeably huge too and it will only become
> larger in future so I don't think fetching from git will be a good solution
> for gcc ever.

Can we use shallow clones? A quick test of gcc-4.7 gave me a 308 MB tar.gz when 
cloned with --depth 1.

-- 
Björn

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] Bug: LDFLAGS is not cleared for kernel devshell

2012-09-12 Thread Björn Stenberg
Hi.

I couldn't figure out where to properly patch this, so I'll just raise the 
issue:

LDFLAGS is configured in bitbake.conf as linker flags to be passed to gcc, not 
to ld. Hence it uses the -Wl prefix.

The linux kernel build system inherits LDFLAGS from the environment and passes 
it directly to 'ld', in conflict with the bitbake view. This problem is avoided 
by clearing LDFLAGS and some other enviroment variables in 
kernel.bbclass:kernel_do_compile().

However this clearing is not done for do_devshell, resulting in errors when 
trying to compile the kernel in devshell:

-
sestofb10:linux>make
scripts/kconfig/conf --silentoldconfig Kconfig
  WRAParch/arm/include/generated/asm/auxvec.h
  WRAParch/arm/include/generated/asm/bitsperlong.h
  WRAParch/arm/include/generated/asm/cputime.h
  WRAParch/arm/include/generated/asm/emergency-restart.h
  WRAParch/arm/include/generated/asm/errno.h
  WRAParch/arm/include/generated/asm/ioctl.h
  WRAParch/arm/include/generated/asm/irq_regs.h
  WRAParch/arm/include/generated/asm/kdebug.h
  WRAParch/arm/include/generated/asm/local.h
  WRAParch/arm/include/generated/asm/local64.h
  WRAParch/arm/include/generated/asm/percpu.h
  WRAParch/arm/include/generated/asm/poll.h
  WRAParch/arm/include/generated/asm/resource.h
  WRAParch/arm/include/generated/asm/sections.h
  WRAParch/arm/include/generated/asm/siginfo.h
  WRAParch/arm/include/generated/asm/sizes.h
  CHK include/linux/version.h
  UPD include/linux/version.h
  CHK include/generated/utsrelease.h
  UPD include/generated/utsrelease.h
  Generating include/generated/mach-types.h
  CC  kernel/bounds.s
  GEN include/generated/bounds.h
  CC  arch/arm/kernel/asm-offsets.s
  GEN include/generated/asm-offsets.h
  CALLscripts/checksyscalls.sh
  CC  scripts/mod/empty.o
  HOSTCC  scripts/mod/mk_elfconfig
  MKELF   scripts/mod/elfconfig.h
  HOSTCC  scripts/mod/file2alias.o
  HOSTCC  scripts/mod/modpost.o
  HOSTCC  scripts/mod/sumversion.o
  HOSTLD  scripts/mod/modpost
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/conmakehash
  CC  init/main.o
  CHK include/generated/compile.h
  UPD include/generated/compile.h
  CC  init/version.o
  CC  init/do_mounts.o
  LD  init/mounts.o
arm-oe-linux-gnueabi-ld: unrecognized option '-Wl,-O1'
arm-oe-linux-gnueabi-ld: use the --help option for usage information
make[1]: *** [init/mounts.o] Error 1
make: *** [init] Error 2
sestofb10:linux>
-

-- 
Björn

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/3] Add -ptest package group

2012-09-03 Thread Björn Stenberg
Koen Kooi wrote:
> These have always been called ${PN}-tests, why the change?

When I discussed package testing informally before submitting patches, I found 
that some people tend to lump all types of testing into one big "Test" bucket 
and get very confused.

By giving this concept a slightly less generic name, we can discuss it 
specifically without confusing it with other types of tests.

The existing -tests recipes are, as far as I can see, standalone packages that 
have little in common with each other. In contrast, -ptest packages are 
designed to be more like -dev or -dbg packages in that they don't have separate 
recipes and they share a common interface.

-- 
Björn

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 2/3] Enable bash-ptest

2012-08-31 Thread Björn Stenberg
Saul Wold wrote:
> You new patches still need patch headers with Upstream-Status and
> Signed-off-by tags.

Ouch, sorry about that. I added Signed-off but forgot upstream. I'll be more 
careful next time.

> Should this be a DISTRO or IMAGE FEATURE? I can see potential
> arguments for both sides, what was your thinking on choosing IMAGE
> over DISTRO?

I chose IMAGE since that is how the -dbg and -dev package groups are enabled, 
and -ptest is modeled after them. Also we have the EXTRA_IMAGE_FEATURES setting 
that can be used to enable this temporarily while I don't know if we have 
anything similar for DISTRO_FEATURES?

-- 
Björn

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH 3/3] New recipe: ptest-runner

2012-08-31 Thread Björn Stenberg
This package contains the top-level script that seeks out and starts all
package tests.
---
 .../ptest-runner/files/ptest-runner|   16 
 .../ptest-runner/ptest-runner_1.0.bb   |   17 +
 2 files changed, 33 insertions(+), 0 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/recipes-support/ptest-runner/files/ptest-runner 
b/meta/recipes-support/ptest-runner/files/ptest-runner
new file mode 100644
index 000..7c5475e
--- /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 [ -d "/usr/lib/$x/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 000..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


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/3] Add -ptest package group

2012-08-31 Thread Björn Stenberg
This patch creates a new package group -ptest to contain the tests from
each package.

Signed-off-by: Björn Stenberg 
---
 meta/classes/distutils-common-base.bbclass |5 -
 meta/classes/image.bbclass |6 --
 meta/classes/task.bbclass  |2 +-
 meta/conf/bitbake.conf |   12 +++-
 4 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/meta/classes/distutils-common-base.bbclass 
b/meta/classes/distutils-common-base.bbclass
index f66a5cd..7db015b 100644
--- a/meta/classes/distutils-common-base.bbclass
+++ b/meta/classes/distutils-common-base.bbclass
@@ -5,7 +5,7 @@ EXTRA_OEMAKE = ""
 export STAGING_INCDIR
 export STAGING_LIBDIR
 
-PACKAGES = "${PN}-dev ${PN}-dbg ${PN}-doc ${PN}"
+PACKAGES = "${PN}-dev ${PN}-dbg ${PN}-ptest ${PN}-doc ${PN}"
 
 FILES_${PN} = "${bindir}/* ${libdir}/* ${libdir}/${PYTHON_DIR}/*"
 
@@ -19,3 +19,6 @@ FILES_${PN}-dbg += "\
   ${PYTHON_SITEPACKAGES_DIR}/*/.debug \
   ${PYTHON_SITEPACKAGES_DIR}/*/*/.debug \
 "
+FILES_${PN}-ptest += "\
+  ${PYTHON_SITEPACKAGES_DIR}/${PTEST_NAME} \
+"
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 72720f1..c154bc2 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)
 
@@ -53,6 +53,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/task.bbclass b/meta/classes/task.bbclass
index 6ec154a..653f149 100644
--- a/meta/classes/task.bbclass
+++ b/meta/classes/task.bbclass
@@ -20,7 +20,7 @@ python () {
 packages = d.getVar('PACKAGES', True).split()
 genpackages = []
 for pkg in packages:
-for postfix in ['-dbg', '-dev']:
+for postfix in ['-dbg', '-ptest', '-dev']:
 genpackages.append(pkg+postfix)
 d.setVar('PACKAGES', ' '.join(packages+genpackages))
 }
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 7dfeda3..d10e933 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -220,6 +220,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 \
@@ -263,7 +267,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 = ""
 
@@ -307,6 +311,12 @@ 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})"
+
 FILES_${PN}-locale = "${datadir}/locale"
 
 # File manifest
-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH 2/3] Enable bash-ptest

2012-08-31 Thread Björn Stenberg
Patch Makefile.in to allow test programs be built on host and ran on
target.
Patch tests/run-all to output PASS/FAIL for each testcase.
Patch recipe to contitionally build and install ptest.

Signed-off-by: Björn Stenberg 
---
 .../bash/bash-4.2/build-tests.patch|   34 
 meta/recipes-extended/bash/bash-4.2/run-ptest  |2 +
 .../bash/bash-4.2/test-output.patch|   19 +++
 meta/recipes-extended/bash/bash.inc|   23 +
 meta/recipes-extended/bash/bash_4.2.bb |5 ++-
 5 files changed, 82 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-extended/bash/bash-4.2/build-tests.patch
 create mode 100644 meta/recipes-extended/bash/bash-4.2/run-ptest
 create mode 100644 meta/recipes-extended/bash/bash-4.2/test-output.patch

diff --git a/meta/recipes-extended/bash/bash-4.2/build-tests.patch 
b/meta/recipes-extended/bash/bash-4.2/build-tests.patch
new file mode 100644
index 000..17276c7
--- /dev/null
+++ b/meta/recipes-extended/bash/bash-4.2/build-tests.patch
@@ -0,0 +1,34 @@
+diff -uNr a/Makefile.in b/Makefile.in
+--- a/Makefile.in  2012-08-31 13:54:15.259491840 +0200
 b/Makefile.in  2012-08-31 14:54:46.508053649 +0200
+@@ -827,20 +827,26 @@
+   fi
+ 
+ recho$(EXEEXT):   $(SUPPORT_SRC)recho.c
+-  @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)recho.c 
${LIBS_FOR_BUILD}
++  @$(CC) $(CCFLAGS) -o $@ $<
+ 
+ zecho$(EXEEXT):   $(SUPPORT_SRC)zecho.c
+-  @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)zecho.c 
${LIBS_FOR_BUILD}
++  @$(CC) $(CCFLAGS) -o $@ $<
+ 
+ printenv$(EXEEXT):$(SUPPORT_SRC)printenv.c
+-  @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)printenv.c 
${LIBS_FOR_BUILD}
++  @$(CC) $(CCFLAGS) -o $@ $<
+ 
+ xcase$(EXEEXT):   $(SUPPORT_SRC)xcase.c
+-  @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)xcase.c 
${LIBS_FOR_BUILD}
++  @$(CC) $(CCFLAGS) -o $@ $<
+ 
+-test tests check: force $(Program) $(TESTS_SUPPORT)
++test tests check:
++  @$(MAKE) buildtest
++  @$(MAKE) runtest
++
++buildtest: force $(Program) $(TESTS_SUPPORT)
+   @-test -d tests || mkdir tests
+   @cp $(TESTS_SUPPORT) tests
++
++runtest:
+   @( cd $(srcdir)/tests && \
+   PATH=$(BUILD_DIR)/tests:$$PATH THIS_SH=$(THIS_SH) $(SHELL) 
${TESTSCRIPT} )
diff --git a/meta/recipes-extended/bash/bash-4.2/run-ptest 
b/meta/recipes-extended/bash/bash-4.2/run-ptest
new file mode 100644
index 000..8dd3b99
--- /dev/null
+++ b/meta/recipes-extended/bash/bash-4.2/run-ptest
@@ -0,0 +1,2 @@
+#!/bin/sh
+make -k THIS_SH=/bin/bash BUILD_DIR=. runtest
diff --git a/meta/recipes-extended/bash/bash-4.2/test-output.patch 
b/meta/recipes-extended/bash/bash-4.2/test-output.patch
new file mode 100644
index 000..065a85c
--- /dev/null
+++ b/meta/recipes-extended/bash/bash-4.2/test-output.patch
@@ -0,0 +1,19 @@
+diff -uNr a/tests/run-all b/tests/run-all
+--- a/tests/run-all2012-06-14 10:15:15.007467700 +0200
 b/tests/run-all2012-06-14 10:19:26.464678067 +0200
+@@ -22,6 +22,14 @@
+   case $x in
+   $0|run-minimal|run-gprof)   ;;
+   *.orig|*~) ;;
+-  *)  echo $x ; sh $x ;;
++  *)  echo $x
++  output=`sh $x`
++  if [ -n "$output" ]; then
++  echo "$output"
++  echo "FAIL: $x"
++  else
++  echo "PASS: $x"
++  fi
++  ;;
+   esac
+ done
diff --git a/meta/recipes-extended/bash/bash.inc 
b/meta/recipes-extended/bash/bash.inc
index 3684191..7f7a965 100644
--- a/meta/recipes-extended/bash/bash.inc
+++ b/meta/recipes-extended/bash/bash.inc
@@ -21,18 +21,41 @@ ALTERNATIVE_PRIORITY = "100"
 
 export AUTOHEADER = "true"
 
+RDEPENDS_${PN}-ptest += "make"
+FILES_${PN}-dbg += "${PTEST_PATH}/.debug \
+${PTEST_PATH}/tests/.debug"
+
+PTEST_ENABLED = "${@base_contains('IMAGE_FEATURES', 'ptest-pkgs', '1', '0', 
d)}"
+
 do_configure_prepend () {
if [ ! -e acinclude.m4 ]; then
cat aclocal.m4 > acinclude.m4
fi
 }
 
+do_compile_append () {
+if [ ${PTEST_ENABLED} = "1" ] ; then
+   oe_runmake buildtest
+fi
+}
+
 do_install_append () {
# Move /usr/bin/bash to /bin/bash, if need
if [ "${base_bindir}" != "${bindir}" ]; then
mkdir -p ${D}${base_bindir}
mv ${D}${bindir}/bash ${D}${base_bindir}
fi
+
+if [ "${PN}" = "${BPN}" -a ${PTEST_ENABLED} = "1" ]; then
+mkdir -p ${D}${PTEST_PATH}
+install -m 0755 ${WORKDIR}/run-ptest${D}${PTEST_PATH}
+install -m 0755 ${B}/Makefile

[OE-core] [PATCH 0/3] RFC: Package testing

2012-08-31 Thread Björn Stenberg
(An earlier version of this was posted to the yocto list last week:
https://lists.yoctoproject.org/pipermail/yocto/2012-August/011166.html)

This is a first set of patches implementing the package testing concept
I proposed in
https://lists.yoctoproject.org/pipermail/yocto/2012-June/009443.html

In summary, the proposal creates a new package group called -ptest that
contains the test suites included with many source packages, compiled to
run on target.

Packaging the test suites sometimes requires patching makefiles to allow
test tools to be cross-compiled. And it sometimes requires patching
and/or translation of the test output to produce a generic output format
that can be automatically parsed. I have included an example patch for
bash that does just that.

I have also included "ptest-runnner", a simple script to find and run
all installed ptests.

The idea is to eventually upstream these changes, both for the benefit
of the entire ecosystem and of course to reduce the number of patches.

However I won't downplay the effort required to get hundreds of upstream
projects to agree on a common concept for test cross compilation and
result formatting.

I see two main options: Implement first or discuss first.

a) Implement first: We design and implement a good system for yocto/oe
and then, once it has proven itself, engage the larger open source
community with our already tested concept.

Pro: It's easier to discuss an already working system
Con: We'll have to manage patches for all packages until agreement

b) Discuss first: We invite the whole open source community to discuss
and try to agree on how to handle cross-compiled test cases and test
result formatting before we implement anything.

Pro: No increased patch load until agreement
Con: No result until agreement, which could potentially take a long time

My suggestion is a). I'm open for all suggestions that would make the
patch load easier to manage.

Björn Stenberg (3):
  Add -ptest package group
  Enable bash-ptest
  New recipe: ptest-runner

 meta/classes/distutils-common-base.bbclass |5 ++-
 meta/classes/image.bbclass |6 ++-
 meta/classes/task.bbclass  |2 +-
 meta/conf/bitbake.conf |   12 ++-
 .../bash/bash-4.2/build-tests.patch|   34 
 meta/recipes-extended/bash/bash-4.2/run-ptest  |2 +
 .../bash/bash-4.2/test-output.patch|   19 +++
 meta/recipes-extended/bash/bash.inc|   23 +
 meta/recipes-extended/bash/bash_4.2.bb |5 ++-
 .../ptest-runner/files/ptest-runner|   16 +
 .../ptest-runner/ptest-runner_1.0.bb   |   17 ++
 11 files changed, 135 insertions(+), 6 deletions(-)
 create mode 100644 meta/recipes-extended/bash/bash-4.2/build-tests.patch
 create mode 100644 meta/recipes-extended/bash/bash-4.2/run-ptest
 create mode 100644 meta/recipes-extended/bash/bash-4.2/test-output.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


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] pigz: Update to upstream version 2.2.5

2012-08-10 Thread Björn Stenberg
Also added beginline/endline to LIC_FILES_CHKSUM to not track whole pigz.c.

Signed-off-by: Björn Stenberg 
---
 .../pigz/{pigz_2.2.4.bb => pigz_2.2.5.bb}  |8 +++-
 1 files changed, 3 insertions(+), 5 deletions(-)
 rename meta/recipes-extended/pigz/{pigz_2.2.4.bb => pigz_2.2.5.bb} (26%)

diff --git a/meta/recipes-extended/pigz/pigz_2.2.4.bb
b/meta/recipes-extended/pigz/pigz_2.2.5.bb
similarity index 26%
rename from meta/recipes-extended/pigz/pigz_2.2.4.bb
rename to meta/recipes-extended/pigz/pigz_2.2.5.bb
index e76c49c..76c7c6c 100644
--- a/meta/recipes-extended/pigz/pigz_2.2.4.bb
+++ b/meta/recipes-extended/pigz/pigz_2.2.5.bb
@@ -1,11 +1,9 @@
 require pigz.inc

-PR = "r2"
-
 NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"

 BBCLASSEXTEND = "native"

-SRC_URI[md5sum] = "9df2a3c742524446fa4e797c17e8fd85"
-SRC_URI[sha256sum] =
"7e7967c47f66c07be97cbfa25c8816b72f9d35258466ea31eddc7666c914160e"
-LIC_FILES_CHKSUM = "file://pigz.c;md5=53f47c097bbf11b937a421b1816a8dc5"
+SRC_URI[md5sum] = "188f769ccedc403893d03049ad31e969"
+SRC_URI[sha256sum] =
"e37498cbf3a475d7ebe2519751188c29564bf8dd27ba68bd3c7fe1ac08792759"
+LIC_FILES_CHKSUM =
"file://pigz.c;beginline=7;endline=21;md5=a21d4075cb00ab4ca17fce5e7534ca95"
--
1.7.5.4

-- 
Björn

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] pigz: Update to upstream version 2.2.5

2012-08-09 Thread Björn Stenberg
---
 meta/recipes-extended/pigz/pigz_2.2.4.bb |   11 ---
 meta/recipes-extended/pigz/pigz_2.2.5.bb |   11 +++
 2 files changed, 11 insertions(+), 11 deletions(-)
 delete mode 100644 meta/recipes-extended/pigz/pigz_2.2.4.bb
 create mode 100644 meta/recipes-extended/pigz/pigz_2.2.5.bb

diff --git a/meta/recipes-extended/pigz/pigz_2.2.4.bb 
b/meta/recipes-extended/pigz/pigz_2.2.4.bb
deleted file mode 100644
index e76c49c..000
--- a/meta/recipes-extended/pigz/pigz_2.2.4.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require pigz.inc
-
-PR = "r2"
-
-NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
-
-BBCLASSEXTEND = "native"
-
-SRC_URI[md5sum] = "9df2a3c742524446fa4e797c17e8fd85"
-SRC_URI[sha256sum] = 
"7e7967c47f66c07be97cbfa25c8816b72f9d35258466ea31eddc7666c914160e"
-LIC_FILES_CHKSUM = "file://pigz.c;md5=53f47c097bbf11b937a421b1816a8dc5"
diff --git a/meta/recipes-extended/pigz/pigz_2.2.5.bb 
b/meta/recipes-extended/pigz/pigz_2.2.5.bb
new file mode 100644
index 000..36669c2
--- /dev/null
+++ b/meta/recipes-extended/pigz/pigz_2.2.5.bb
@@ -0,0 +1,11 @@
+require pigz.inc
+
+NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
+
+BBCLASSEXTEND = "native"
+
+SRC_URI[md5sum] = "188f769ccedc403893d03049ad31e969"
+SRC_URI[sha256sum] = 
"e37498cbf3a475d7ebe2519751188c29564bf8dd27ba68bd3c7fe1ac08792759"
+LIC_FILES_CHKSUM = "file://pigz.c;md5=ee5481b3699dcac1f63cec8d038ada8a"
-- 
1.7.10.4

-- 
Björn

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH] pigz: Update to upstream version 2.2.5

2012-08-08 Thread Björn Stenberg
Signed-off-by: Björn Stenberg 
---
 meta/recipes-extended/pigz/pigz_2.2.4.bb |   11 ---
 meta/recipes-extended/pigz/pigz_2.2.5.bb |   11 +++
 2 files changed, 11 insertions(+), 11 deletions(-)
 delete mode 100644 meta/recipes-extended/pigz/pigz_2.2.4.bb
 create mode 100644 meta/recipes-extended/pigz/pigz_2.2.5.bb

diff --git a/meta/recipes-extended/pigz/pigz_2.2.4.bb 
b/meta/recipes-extended/pigz/pigz_2.2.4.bb
deleted file mode 100644
index e76c49c..000
--- a/meta/recipes-extended/pigz/pigz_2.2.4.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require pigz.inc
-
-PR = "r2"
-
-NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
-
-BBCLASSEXTEND = "native"
-
-SRC_URI[md5sum] = "9df2a3c742524446fa4e797c17e8fd85"
-SRC_URI[sha256sum] = 
"7e7967c47f66c07be97cbfa25c8816b72f9d35258466ea31eddc7666c914160e"
-LIC_FILES_CHKSUM = "file://pigz.c;md5=53f47c097bbf11b937a421b1816a8dc5"
diff --git a/meta/recipes-extended/pigz/pigz_2.2.5.bb 
b/meta/recipes-extended/pigz/pigz_2.2.5.bb
new file mode 100644
index 000..36669c2
--- /dev/null
+++ b/meta/recipes-extended/pigz/pigz_2.2.5.bb
@@ -0,0 +1,11 @@
+require pigz.inc
+
+PR = "r1"
+
+NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
+
+BBCLASSEXTEND = "native"
+
+SRC_URI[md5sum] = "188f769ccedc403893d03049ad31e969"
+SRC_URI[sha256sum] = 
"e37498cbf3a475d7ebe2519751188c29564bf8dd27ba68bd3c7fe1ac08792759"
+LIC_FILES_CHKSUM = "file://pigz.c;md5=ee5481b3699dcac1f63cec8d038ada8a"
-- 
1.7.5.4

-- 
Björn

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] bitbake.conf: Add PARALLEL_MAKE to BB_HASHBASE_WHITELIST

2012-04-17 Thread Björn Stenberg
Richard Purdie wrote:
> The value of PARALLEL_MAKE shouldn't affect sstate checksums. In general it
> doesn't as the value is injected as a task override and the sstate checksum
> doesn't track these. That isn't the case for linux-yocto in particular so
> adding it the list of variables to ignore is useful.
> 
> Signed-off-by: Richard Purdie 
> ---
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index 501863b..911854b 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -737,7 +737,7 @@ BB_CONSOLELOG ?= "${TMPDIR}/cooker.log.${DATETIME}"
>  
>  # Setup our default hash policy
>  BB_SIGNATURE_HANDLER ?= "OEBasic"
> -BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR 
> SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM USER 
> FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST 
> PRSERV_PORT PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN"
> +BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR 
> SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM USER 
> FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST 
> PRSERV_PORT PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE"
>  BB_HASHCONFIG_WHITELIST ?= "${BB_HASHBASE_WHITELIST} DATE TIME 
> SESSION_MANAGER DBUS_SESSION_BUS_ADDRESS SSH_AGENT_PID XDG_SESSION_COOKIE 
> SSH_AUTH_SOCK XAUTHORITY"
>  
>  MLPREFIX ??= ""
> 

Tested-by: Björn Stenberg 

-- 
Björn

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] Add pigz as gzip-native alternative.

2012-03-20 Thread Björn Stenberg
Koen Kooi wrote:
> > My intention with the patch was to provide a native-only recipe for pigz,
> > to improve distro build speed.
> 
> But it went in as a regular recipe and hence needs to play well with others.

I thought I made it native-only by only providing gzip-native?

-- 
Björn

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] Add pigz as gzip-native alternative.

2012-03-19 Thread Björn Stenberg
Koen Kooi wrote:
> Op 15 mrt. 2012, om 09:25 heeft Björn Stenberg het volgende geschreven:
> > +PROVIDES_virtclass-native += "gzip-native"
> 
> This is either missing update-alternatives entries or it is missing
> RREPLACES/RCONFLICTS with gzip/busybox/etc. Or both.

My intention with the patch was to provide a native-only recipe for pigz, to 
improve distro build speed.

I'm not sure there is much interest in using pigz on target.

-- 
Björn

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH] Add pigz as gzip-native alternative.

2012-03-15 Thread Björn Stenberg
pigz, which stands for parallel implementation of gzip, is a fully functional 
replacement for gzip that exploits multiple processors and multiple cores to 
the hilt when compressing data. pigz was written by Mark Adler, and uses the 
zlib and pthread libraries.

This recipe adds pigz as an alternative gzip-native implementation only.

Signed-off-by: Björn Stenberg 
---
 meta/recipes-extended/pigz/files/ldflags.patch |   17 +
 meta/recipes-extended/pigz/pigz.inc|   21 +
 meta/recipes-extended/pigz/pigz_2.2.4.bb   |9 +
 3 files changed, 47 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-extended/pigz/files/ldflags.patch
 create mode 100644 meta/recipes-extended/pigz/pigz.inc
 create mode 100644 meta/recipes-extended/pigz/pigz_2.2.4.bb

diff --git a/meta/recipes-extended/pigz/files/ldflags.patch 
b/meta/recipes-extended/pigz/files/ldflags.patch
new file mode 100644
index 000..928c3a5
--- /dev/null
+++ b/meta/recipes-extended/pigz/files/ldflags.patch
@@ -0,0 +1,17 @@
+Link using the bitbake LDFLAGS.
+
+Signed-off-by: Björn Stenberg 
+
+Upstream-Status: Pending
+
+--- pigz-2.2.4/Makefile.orig   2012-01-01 02:46:58.0 +0100
 pigz-2.2.4/Makefile2012-03-09 08:47:40.025094863 +0100
+@@ -2,7 +2,7 @@
+ CFLAGS=-O3 -Wall -Wextra
+ 
+ pigz: pigz.o yarn.o
+-  $(CC) -o pigz pigz.o yarn.o -lpthread -lz
++  $(CC) $(LDFLAGS) -o pigz pigz.o yarn.o -lpthread -lz
+   ln -f pigz unpigz
+ 
+ pigz.o: pigz.c yarn.h
diff --git a/meta/recipes-extended/pigz/pigz.inc 
b/meta/recipes-extended/pigz/pigz.inc
new file mode 100644
index 000..acf1b71
--- /dev/null
+++ b/meta/recipes-extended/pigz/pigz.inc
@@ -0,0 +1,21 @@
+SUMMARY = "A parallel implementation of gzip"
+DESCRIPTION = "pigz, which stands for parallel implementation of gzip, is a \
+fully functional replacement for gzip that exploits multiple processors and \
+multiple cores to the hilt when compressing data. pigz was written by Mark \
+Adler, and uses the zlib and pthread libraries."
+HOMEPAGE = "http://zlib.net/pigz/";
+SECTION = "console/utils"
+LICENSE = "Zlib"
+
+SRC_URI = "http://zlib.net/pigz/pigz-${PV}.tar.gz \
+   file://ldflags.patch"
+
+PROVIDES_virtclass-native += "gzip-native"
+
+DEPENDS_virtclass-native = "zlib-native"
+
+do_install () {
+install -d ${D}${bindir}
+install ${B}/pigz ${D}${bindir}/gzip
+install ${B}/unpigz ${D}${bindir}/gunzip
+}
diff --git a/meta/recipes-extended/pigz/pigz_2.2.4.bb 
b/meta/recipes-extended/pigz/pigz_2.2.4.bb
new file mode 100644
index 000..598bbe3
--- /dev/null
+++ b/meta/recipes-extended/pigz/pigz_2.2.4.bb
@@ -0,0 +1,9 @@
+require pigz.inc
+
+PR = "r0"
+
+BBCLASSEXTEND = "native"
+
+SRC_URI[md5sum] = "9df2a3c742524446fa4e797c17e8fd85"
+SRC_URI[sha256sum] = 
"7e7967c47f66c07be97cbfa25c8816b72f9d35258466ea31eddc7666c914160e"
+LIC_FILES_CHKSUM = "file://pigz.c;md5=53f47c097bbf11b937a421b1816a8dc5"
-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH] Add pigz as gzip-native alternative.

2012-03-14 Thread Björn Stenberg
pigz, which stands for parallel implementation of gzip, is a fully functional 
replacement for gzip that exploits multiple processors and multiple cores to 
the hilt when compressing data. pigz was written by Mark Adler, and uses the 
zlib and pthread libraries.

This recipe adds pigz as an alternative gzip-native implementation only.

Signed-off-by: Björn Stenberg 
---
 meta/recipes-extended/pigz/files/ldflags.patch |   17 +
 meta/recipes-extended/pigz/pigz.inc|   21 +
 meta/recipes-extended/pigz/pigz_2.2.4.bb   |9 +
 3 files changed, 47 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-extended/pigz/files/ldflags.patch
 create mode 100644 meta/recipes-extended/pigz/pigz.inc
 create mode 100644 meta/recipes-extended/pigz/pigz_2.2.4.bb

diff --git a/meta/recipes-extended/pigz/files/ldflags.patch 
b/meta/recipes-extended/pigz/files/ldflags.patch
new file mode 100644
index 000..928c3a5
--- /dev/null
+++ b/meta/recipes-extended/pigz/files/ldflags.patch
@@ -0,0 +1,17 @@
+Link using the bitbake LDFLAGS.
+
+Signed-off-by: Björn Stenberg 
+
+Upstream-Status: Pending
+
+--- pigz-2.2.4/Makefile.orig   2012-01-01 02:46:58.0 +0100
 pigz-2.2.4/Makefile2012-03-09 08:47:40.025094863 +0100
+@@ -2,7 +2,7 @@
+ CFLAGS=-O3 -Wall -Wextra
+ 
+ pigz: pigz.o yarn.o
+-  $(CC) -o pigz pigz.o yarn.o -lpthread -lz
++  $(CC) $(LDFLAGS) -o pigz pigz.o yarn.o -lpthread -lz
+   ln -f pigz unpigz
+ 
+ pigz.o: pigz.c yarn.h
diff --git a/meta/recipes-extended/pigz/pigz.inc 
b/meta/recipes-extended/pigz/pigz.inc
new file mode 100644
index 000..b501d7a
--- /dev/null
+++ b/meta/recipes-extended/pigz/pigz.inc
@@ -0,0 +1,21 @@
+SUMMARY = "A parallel implementation of gzip"
+DESCRIPTION = "pigz, which stands for parallel implementation of gzip, is a \
+fully functional replacement for gzip that exploits multiple processors and \
+multiple cores to the hilt when compressing data. pigz was written by Mark \
+Adler, and uses the zlib and pthread libraries."
+HOMEPAGE = "http://zlib.net/pigz/";
+SECTION = "console/utils"
+LICENSE = "Zlib"
+
+SRC_URI = "http://zlib.net/pigz/pigz-${PV}.tar.gz \
+   file://ldflags.patch"
+
+PROVIDES += "gzip-native"
+
+DEPENDS_virtclass-native = "zlib-native"
+
+do_install () {
+install -d ${D}${bindir}
+install ${B}/pigz ${D}${bindir}/gzip
+install ${B}/unpigz ${D}${bindir}/gunzip
+}
diff --git a/meta/recipes-extended/pigz/pigz_2.2.4.bb 
b/meta/recipes-extended/pigz/pigz_2.2.4.bb
new file mode 100644
index 000..598bbe3
--- /dev/null
+++ b/meta/recipes-extended/pigz/pigz_2.2.4.bb
@@ -0,0 +1,9 @@
+require pigz.inc
+
+PR = "r0"
+
+BBCLASSEXTEND = "native"
+
+SRC_URI[md5sum] = "9df2a3c742524446fa4e797c17e8fd85"
+SRC_URI[sha256sum] = 
"7e7967c47f66c07be97cbfa25c8816b72f9d35258466ea31eddc7666c914160e"
+LIC_FILES_CHKSUM = "file://pigz.c;md5=53f47c097bbf11b937a421b1816a8dc5"
-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


[OE-core] [PATCH] Add pigz as gzip-native alternative.

2012-03-13 Thread Björn Stenberg
pigz, which stands for parallel implementation of gzip, is a fully functional 
replacement for gzip that exploits multiple processors and multiple cores to 
the hilt when compressing data. pigz was written by Mark Adler, and uses the 
zlib and pthread libraries.

This recipe adds pigz as an alternative provider of gzip-native. Pigz is much 
faster than gzip on multi-core machines.

Upstream-status: Pending
Signed-off-by: Björn Stenberg 
---
 meta/recipes-extended/pigz/files/ldflags.patch |   11 +++
 meta/recipes-extended/pigz/pigz.inc|   21 +
 meta/recipes-extended/pigz/pigz_2.2.4.bb   |9 +
 3 files changed, 41 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-extended/pigz/files/ldflags.patch
 create mode 100644 meta/recipes-extended/pigz/pigz.inc
 create mode 100644 meta/recipes-extended/pigz/pigz_2.2.4.bb

diff --git a/meta/recipes-extended/pigz/files/ldflags.patch 
b/meta/recipes-extended/pigz/files/ldflags.patch
new file mode 100644
index 000..534d280
--- /dev/null
+++ b/meta/recipes-extended/pigz/files/ldflags.patch
@@ -0,0 +1,11 @@
+--- pigz-2.2.4/Makefile.orig   2012-01-01 02:46:58.0 +0100
 pigz-2.2.4/Makefile2012-03-09 08:47:40.025094863 +0100
+@@ -2,7 +2,7 @@
+ CFLAGS=-O3 -Wall -Wextra
+ 
+ pigz: pigz.o yarn.o
+-  $(CC) -o pigz pigz.o yarn.o -lpthread -lz
++  $(CC) $(LDFLAGS) -o pigz pigz.o yarn.o -lpthread -lz
+   ln -f pigz unpigz
+ 
+ pigz.o: pigz.c yarn.h
diff --git a/meta/recipes-extended/pigz/pigz.inc 
b/meta/recipes-extended/pigz/pigz.inc
new file mode 100644
index 000..b501d7a
--- /dev/null
+++ b/meta/recipes-extended/pigz/pigz.inc
@@ -0,0 +1,21 @@
+SUMMARY = "A parallel implementation of gzip"
+DESCRIPTION = "pigz, which stands for parallel implementation of gzip, is a \
+fully functional replacement for gzip that exploits multiple processors and \
+multiple cores to the hilt when compressing data. pigz was written by Mark \
+Adler, and uses the zlib and pthread libraries."
+HOMEPAGE = "http://zlib.net/pigz/";
+SECTION = "console/utils"
+LICENSE = "Zlib"
+
+SRC_URI = "http://zlib.net/pigz/pigz-${PV}.tar.gz \
+   file://ldflags.patch"
+
+PROVIDES += "gzip-native"
+
+DEPENDS_virtclass-native = "zlib-native"
+
+do_install () {
+install -d ${D}${bindir}
+install ${B}/pigz ${D}${bindir}/gzip
+install ${B}/unpigz ${D}${bindir}/gunzip
+}
diff --git a/meta/recipes-extended/pigz/pigz_2.2.4.bb 
b/meta/recipes-extended/pigz/pigz_2.2.4.bb
new file mode 100644
index 000..598bbe3
--- /dev/null
+++ b/meta/recipes-extended/pigz/pigz_2.2.4.bb
@@ -0,0 +1,9 @@
+require pigz.inc
+
+PR = "r0"
+
+BBCLASSEXTEND = "native"
+
+SRC_URI[md5sum] = "9df2a3c742524446fa4e797c17e8fd85"
+SRC_URI[sha256sum] = 
"7e7967c47f66c07be97cbfa25c8816b72f9d35258466ea31eddc7666c914160e"
+LIC_FILES_CHKSUM = "file://pigz.c;md5=53f47c097bbf11b937a421b1816a8dc5"
-- 
1.7.5.4


___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core