Skip to contentSkip to conversation

fix several ptest issues

PATCH In review Chong Lu 3 participants 9 messages Aug 5, 2014 – Aug 11, 2014

lore
Share & tools
lore

Chong Lu

author
#0 lore raw

cover fix several ptest issues

The following changes since commit 870bb8d35547b8313b3a487d7e8b914ab9470e64:

local.conf.sample.extended: fix example for EXTRA_USERS_PARAMS (2014-08-04 17:38:24 +0100)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib chonglu/ptest
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=chonglu/ptest

Chong Lu (3):
perl: fix the output format of all tests
strace: fix ptest execution failure
dbus: fix ptest issue

 meta/recipes-core/dbus/dbus.inc                         |  7 +++++--
 meta/recipes-devtools/perl/perl-5.20.0/run-ptest        |  2 +-
 .../strace/strace-4.8/Makefile-ptest.patch              | 17 +++++++++++++++--
 3 files changed, 21 insertions(+), 5 deletions(-)
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 1/3 perl: fix the output format of all tests

We should use "PASS:|FAIL:|SKIP: testname" to output results of ptest.

---
 meta/recipes-devtools/perl/perl-5.20.0/run-ptest | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/perl/perl-5.20.0/run-ptest +1 -1
index ed59b4b..1e2dd1b 100644
@@ -1,2 +1,2 @@
 #!/bin/sh
-cd t && ./TEST | sed -u -e 's/^\([^. \t]*\)\.\.\.\+ok/PASS: \1/' -e 's/^\([^. \t]*\)\.\.\.\+skipped/SKIP: \1/' -e 's/^\([^. \t]*\)\.\.\.\+\(.*\)/FAIL: \1\n\2/'
+cd t && ./TEST | sed -u -e 's|\(.*\) .* ok$|PASS: \1|' -e 's|\(.*\) .* skipped|SKIP: \1|' -e 's|\(.*\) \.\(.*\)|FAIL: \1|'
Signature · 1 line
1.9.1
author
#2 lore raw

Re: [PATCH 1/3] perl: fix the output format of all tests

ping

Quoted 15 lines · Chong Lu

We should use "PASS:|FAIL:|SKIP: testname" to output results of ptest.

---
  meta/recipes-devtools/perl/perl-5.20.0/run-ptest | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/perl/perl-5.20.0/run-ptest +1 -1
index ed59b4b..1e2dd1b 100644
@@ -1,2 +1,2 @@
  #!/bin/sh
-cd t && ./TEST | sed -u -e 's/^\([^. \t]*\)\.\.\.\+ok/PASS: \1/' -e 's/^\([^. \t]*\)\.\.\.\+skipped/SKIP: \1/' -e 's/^\([^. \t]*\)\.\.\.\+\(.*\)/FAIL: \1\n\2/'
+cd t && ./TEST | sed -u -e 's|\(.*\) .* ok$|PASS: \1|' -e 's|\(.*\) .* skipped|SKIP: \1|' -e 's|\(.*\) \.\(.*\)|FAIL: \1|'
author
#3 lore raw

PATCH 2/3 strace: fix ptest execution failure

In reply to Chong Lu

ptest needs runtest-TESTS target.
serial-tests is required to generate this target.

---
 .../strace/strace-4.8/Makefile-ptest.patch              | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)
meta/recipes-devtools/strace/strace-4.8/Makefile-ptest.patch +15 -2
index f5556b2..3a0eb39 100644
@@ -1,11 +1,13 @@
 strace: Add ptest
 
+Upstream-Status: Inappropriate
+
 Signed-off-by: Gabriel Barbu <[email protected]>
-Upstream-Status: Pending
+Signed-off-by: Chong Lu <[email protected]>
 
 --- old/tests/Makefile.am	2013-07-23 13:44:24.660481381 +0200
 +++ new/tests/Makefile.am	2013-07-23 16:22:42.937654391 +0200
-@@ -9,3 +9,20 @@
+@@ -9,3 +9,21 @@
  EXTRA_DIST = init.sh $(TESTS)
  
  CLEANFILES = check.log
@@ -18,6 +20,7 @@ Upstream-Status: Pending
 +	install -d $(DESTDIR)/$(TESTDIR)
 +	cp $(BUILDDIR)/$(TESTDIR)/Makefile $(DESTDIR)/$(TESTDIR)
 +	sed -i -e 's/^Makefile:/_Makefile:/' $(DESTDIR)/$(TESTDIR)/Makefile
++	sed -i -e 's/bash/sh/' $(DESTDIR)/$(TESTDIR)/Makefile
 +	for file in $(check_PROGRAMS); do \
 +		install $(BUILDDIR)/$(TESTDIR)/$$file $(DESTDIR)/$(TESTDIR); \
 +	done
@@ -26,3 +29,13 @@ Upstream-Status: Pending
 +		sed -i -e 's/$${srcdir=.}/./g' $(DESTDIR)/$(TESTDIR)/$$file; \
 +	done
 +	sed -i -e 's/$$srcdir/./g' $(DESTDIR)/$(TESTDIR)/net
+--- a/configure.ac
++++ b/configure.ac
+@@ -6,7 +6,7 @@ AC_INIT([strace],
+ AC_CONFIG_SRCDIR([strace.c])
+ AC_CONFIG_AUX_DIR([.])
+ AC_CONFIG_HEADERS([config.h])
+-AM_INIT_AUTOMAKE([foreign dist-xz no-dist-gzip silent-rules])
++AM_INIT_AUTOMAKE([foreign dist-xz no-dist-gzip silent-rules serial-tests])
+ AM_MAINTAINER_MODE
+ AC_CANONICAL_HOST
Signature · 1 line
1.9.1
author
#4 lore raw

Re: [PATCH 2/3] strace: fix ptest execution failure

ping

Quoted 50 lines · Chong Lu

ptest needs runtest-TESTS target.
serial-tests is required to generate this target.

---
  .../strace/strace-4.8/Makefile-ptest.patch              | 17 +++++++++++++++--
  1 file changed, 15 insertions(+), 2 deletions(-)
meta/recipes-devtools/strace/strace-4.8/Makefile-ptest.patch +15 -2
index f5556b2..3a0eb39 100644
@@ -1,11 +1,13 @@
  strace: Add ptest
 
+Upstream-Status: Inappropriate
+
  Signed-off-by: Gabriel Barbu <[email protected]>
-Upstream-Status: Pending
+Signed-off-by: Chong Lu <[email protected]>
 
  --- old/tests/Makefile.am	2013-07-23 13:44:24.660481381 +0200
  +++ new/tests/Makefile.am	2013-07-23 16:22:42.937654391 +0200
-@@ -9,3 +9,20 @@
+@@ -9,3 +9,21 @@
   EXTRA_DIST = init.sh $(TESTS)
 
   CLEANFILES = check.log
@@ -18,6 +20,7 @@ Upstream-Status: Pending
  +	install -d $(DESTDIR)/$(TESTDIR)
  +	cp $(BUILDDIR)/$(TESTDIR)/Makefile $(DESTDIR)/$(TESTDIR)
  +	sed -i -e 's/^Makefile:/_Makefile:/' $(DESTDIR)/$(TESTDIR)/Makefile
++	sed -i -e 's/bash/sh/' $(DESTDIR)/$(TESTDIR)/Makefile
  +	for file in $(check_PROGRAMS); do \
  +		install $(BUILDDIR)/$(TESTDIR)/$$file $(DESTDIR)/$(TESTDIR); \
  +	done
@@ -26,3 +29,13 @@ Upstream-Status: Pending
  +		sed -i -e 's/$${srcdir=.}/./g' $(DESTDIR)/$(TESTDIR)/$$file; \
  +	done
  +	sed -i -e 's/$$srcdir/./g' $(DESTDIR)/$(TESTDIR)/net
+--- a/configure.ac
++++ b/configure.ac
+@@ -6,7 +6,7 @@ AC_INIT([strace],
+ AC_CONFIG_SRCDIR([strace.c])
+ AC_CONFIG_AUX_DIR([.])
+ AC_CONFIG_HEADERS([config.h])
+-AM_INIT_AUTOMAKE([foreign dist-xz no-dist-gzip silent-rules])
++AM_INIT_AUTOMAKE([foreign dist-xz no-dist-gzip silent-rules serial-tests])
+ AM_MAINTAINER_MODE
+ AC_CANONICAL_HOST
author
#5 lore raw

PATCH 3/3 dbus: fix ptest issue

In reply to Chong Lu

We use PTEST_ENABLED to decide whether build ptest package, so inherit ptest.bbclass in dbus.inc in order to using PTEST_ENABLED variable. Remove PACKAGES and ALLOW_EMPTY, since they have been defined in ptest.bbclass.

---
 meta/recipes-core/dbus/dbus.inc | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta/recipes-core/dbus/dbus.inc +5 -2
index d38ba7e..6268103 100644
@@ -8,10 +8,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
 DEPENDS = "expat virtual/libintl"
 RDEPENDS_dbus_class-native = ""
 RDEPENDS_dbus_class-nativesdk = ""
-PACKAGES += "${@bb.utils.contains('PTEST_ENABLED', '1', 'dbus-ptest', '', d)}"
-ALLOW_EMPTY_dbus-ptest = "1"
+inherit ptest
 RDEPENDS_dbus-ptest_class-target = "dbus-test-ptest"
 
+do_install_ptest_base() {
+	rm -rf ${D}${PTEST_PATH}
+}
+
 SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
            file://tmpdir.patch \
            file://dbus-1.init \
Signature · 1 line
1.9.1
#6 lore raw

Re: [PATCH 3/3] dbus: fix ptest issue

Quoted 14 lines · Chong Lu

We use PTEST_ENABLED to decide whether build ptest package, so inherit ptest.bbclass in dbus.inc in order to using PTEST_ENABLED variable. Remove PACKAGES and ALLOW_EMPTY, since they have been defined in ptest.bbclass.

---
 meta/recipes-core/dbus/dbus.inc | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta/recipes-core/dbus/dbus.inc +0 -0
index d38ba7e..6268103 100644

meta/recipes-core/dbus/dbus.inc LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \ · line 12

Quoted 5 lines
meta/recipes-core/dbus/dbus.inc +0 -2
@@ -8,10 +8,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
 DEPENDS = "expat virtual/libintl"
 RDEPENDS_dbus_class-native = ""
 RDEPENDS_dbus_class-nativesdk = ""
-PACKAGES += "${@bb.utils.contains('PTEST_ENABLED', '1', 'dbus-ptest', '', d)}"
-ALLOW_EMPTY_dbus-ptest = "1"

I don't think you've understood what this is doing, its conditionally building the separate dbus-ptest recipe, if ptest is enabled.

Why is it separate? dbus-ptest needs glib and glib needs dbus. Your patch doesn't seem to account for any of that.

"fix ptest issue" is far too vague as a summary of this patch too.

Cheers,

Richard

author
#7 lore raw

Re: [PATCH 3/3] dbus: fix ptest issue

Quoted 24 lines · Richard Purdie
Quoted 14 lines · Chong Lu

We use PTEST_ENABLED to decide whether build ptest package, so inherit ptest.bbclass in dbus.inc in order to using PTEST_ENABLED variable. Remove PACKAGES and ALLOW_EMPTY, since they have been defined in ptest.bbclass.

---
  meta/recipes-core/dbus/dbus.inc | 7 +++++--
  1 file changed, 5 insertions(+), 2 deletions(-)
meta/recipes-core/dbus/dbus.inc +0 -0
index d38ba7e..6268103 100644

meta/recipes-core/dbus/dbus.inc LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \ · line 12

Quoted 5 lines
meta/recipes-core/dbus/dbus.inc +0 -2
@@ -8,10 +8,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
  DEPENDS = "expat virtual/libintl"
  RDEPENDS_dbus_class-native = ""
  RDEPENDS_dbus_class-nativesdk = ""
-PACKAGES += "${@bb.utils.contains('PTEST_ENABLED', '1', 'dbus-ptest', '', d)}"
-ALLOW_EMPTY_dbus-ptest = "1"

I don't think you've understood what this is doing, its conditionally building the separate dbus-ptest recipe, if ptest is enabled.

Quoted 11 lines

Why is it separate? dbus-ptest needs glib and glib needs dbus. Your patch doesn't seem to account for any of that.

"fix ptest issue" is far too vague as a summary of this patch too.

Cheers,

Richard

Hi Richard,

Previously, we use DISTRO_FEATURES to decide whether build ptest, but we use PTEST_ENABLED now. PTEST_ENABLED defined in ptest.bbclass. we did't inherit ptest in dbus recipes, this cause we can't build dbus-ptest package. Based on above reason, I just send this patch to fix this issue. Or do you have a better way?

Best Regards
Chong

#8 lore raw

Re: [PATCH 3/3] dbus: fix ptest issue

Quoted 38 lines · On Tuesday 05 August 2014 18:07:50 Chong Lu wrote:
Quoted 28 lines · Richard Purdie
Quoted 21 lines · Chong Lu

We use PTEST_ENABLED to decide whether build ptest package, so inherit ptest.bbclass in dbus.inc in order to using PTEST_ENABLED variable. Remove PACKAGES and ALLOW_EMPTY, since they have been defined in ptest.bbclass.

---

  meta/recipes-core/dbus/dbus.inc | 7 +++++--
  1 file changed, 5 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/meta/recipes-core/dbus/dbus.inc index d38ba7e..6268103 100644

meta/recipes-core/dbus/dbus.inc +0 -0
@@ -8,10 +8,13 @@ LIC_FILES_CHKSUM =

"file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \>>
DEPENDS = "expat virtual/libintl" RDEPENDS_dbus_class-native = "" RDEPENDS_dbus_class-nativesdk = ""

Quoted 2 lines

-PACKAGES += "${@bb.utils.contains('PTEST_ENABLED', '1', 'dbus-ptest', '', d)}" -ALLOW_EMPTY_dbus-ptest = "1"

I don't think you've understood what this is doing, its conditionally building the separate dbus-ptest recipe, if ptest is enabled.

Quoted 8 lines

Why is it separate? dbus-ptest needs glib and glib needs dbus. Your patch doesn't seem to account for any of that.

"fix ptest issue" is far too vague as a summary of this patch too.

Cheers,

Richard

Quoted 8 lines

Hi Richard,

Previously, we use DISTRO_FEATURES to decide whether build ptest, but we use PTEST_ENABLED now.
PTEST_ENABLED defined in ptest.bbclass. we did't inherit ptest in dbus recipes, this cause we can't build dbus-ptest package.
Based on above reason, I just send this patch to fix this issue. Or do you have a better way?

If you mean that you're setting PTEST_ENABLED globally, you shouldn't be doing that. PTEST_ENABLED is supposed to be used for recipes to *detect* whether ptest should be enabled, so that e.g. we can disable it for the native class.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre