[OE-core] [PATCH v3] json-c: Add ptest for json-c

2022-08-12 Thread Simone Weiss
Adapt json-c recipe to compile and deploy a ptest for json-c.
Also add a small script for executing the tests.
All tests were successful on a trial and took around 20 seconds.

Signed-off-by: Simone Weiß 
Signed-off-by: Kai Tomerius 
---
 .../distro/include/ptest-packagelists.inc |  1 +
 meta/recipes-devtools/json-c/json-c/run-ptest | 20 +++
 meta/recipes-devtools/json-c/json-c_0.16.bb   | 16 +--
 3 files changed, 35 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-devtools/json-c/json-c/run-ptest

diff --git a/meta/conf/distro/include/ptest-packagelists.inc 
b/meta/conf/distro/include/ptest-packagelists.inc
index 6c4339e3e1..56088e4e66 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -22,6 +22,7 @@ PTESTS_FAST = "\
 gettext-ptest \
 glib-networking-ptest \
 gzip-ptest \
+json-c-ptest \
 json-glib-ptest \
 libconvert-asn1-perl-ptest \
 liberror-perl-ptest \
diff --git a/meta/recipes-devtools/json-c/json-c/run-ptest 
b/meta/recipes-devtools/json-c/json-c/run-ptest
new file mode 100644
index 00..9ee6095ea2
--- /dev/null
+++ b/meta/recipes-devtools/json-c/json-c/run-ptest
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# This script is used to run json-c test suites
+cd tests
+
+ret_val=0
+for i in test*.test; do
+# test_basic is not an own testcase, just
+# contains common code of other tests
+if [ "$i" != "test_basic.test" ]; then
+if ./$i > json-c_test.log 2>&1 ; then
+echo PASS: $i
+else
+ret_val=1
+echo FAIL: $i
+fi
+fi
+done
+
+exit $ret_val
diff --git a/meta/recipes-devtools/json-c/json-c_0.16.bb 
b/meta/recipes-devtools/json-c/json-c_0.16.bb
index fdec5ec9af..50431081bb 100644
--- a/meta/recipes-devtools/json-c/json-c_0.16.bb
+++ b/meta/recipes-devtools/json-c/json-c_0.16.bb
@@ -4,7 +4,10 @@ HOMEPAGE = "https://github.com/json-c/json-c/wiki;
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2"
 
-SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz;
+SRC_URI = " \
+https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz \
+file://run-ptest \
+"
 
 SRC_URI[sha256sum] = 
"8e45ac8f96ec7791eaf3bb7ee50e9c2100bbbc87b8d0f1d030c5ba8a0288d96b"
 
@@ -13,6 +16,15 @@ UPSTREAM_CHECK_REGEX = "json-c-(?P\d+(\.\d+)+)-\d+"
 
 RPROVIDES:${PN} = "libjson"
 
-inherit cmake
+inherit cmake ptest
+
+do_install_ptest() {
+install -d ${D}/${PTEST_PATH}/tests
+install ${B}/tests/test* ${D}/${PTEST_PATH}/tests
+install ${S}/tests/*.test ${D}/${PTEST_PATH}/tests
+install ${S}/tests/*.expected ${D}/${PTEST_PATH}/tests
+install ${S}/tests/test-defs.sh ${D}/${PTEST_PATH}/tests
+install ${S}/tests/valid*json ${D}/${PTEST_PATH}/tests
+}
 
 BBCLASSEXTEND = "native nativesdk"
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#169276): 
https://lists.openembedded.org/g/openembedded-core/message/169276
Mute This Topic: https://lists.openembedded.org/mt/92976583/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH v2] json-c: Add ptest for json-c

2022-08-11 Thread Simone Weiss
Hi,

thanks for asking this, I started qemu by using runqemu directly and
without any further arguments. With kvm the test took around 20
seconds. I'll send a new patch with adding json-c-ptest to PTEST_SLOW.

Simone
On Thu, 2022-08-11 at 17:41 +0200, Alexander Kanavin wrote:
> CAUTION: This email originated from outside of the Elektrobit
> organization. Do not click links or open attachments unless you
> recognize the sender and know the content is safe.
> 
> 
> Just to be sure, did you use qemu with kvm option? I find it odd that
> json library tests would take this long. Can you double check what
> they do? We can't afford to extend ptest run time indefinitely, it's
> already close to 4 hours.
> 
> Alex
> 
> On Thu, 11 Aug 2022 at 17:26, Weiß, Simone <
> simone.we...@elektrobit.com> wrote:
> > Hi,
> > 
> > For me it took around ~500 seconds. I considered it as slow, as
> > `PTESTS_FAST` should take around ~30 seconds according to the
> > comment
> > on ptest-packagelists.inc.
> > 
> > Simone
> > On Thu, 2022-08-11 at 10:23 +0200, Alexander Kanavin via
> > lists.openembedded.org wrote:
> > > CAUTION: This email originated from outside of the Elektrobit
> > > organization. Do not click links or open attachments unless you
> > > recognize the sender and know the content is safe.
> > > 
> > > 
> > > On Wed, 10 Aug 2022 at 21:40, Simone Weiss <
> > > simone.we...@elektrobit.com> wrote:
> > > > --- a/meta/conf/distro/include/ptest-packagelists.inc
> > > > +++ b/meta/conf/distro/include/ptest-packagelists.inc
> > > > @@ -87,6 +87,7 @@ PTESTS_SLOW = "\
> > > >  findutils-ptest \
> > > >  glib-2.0-ptest \
> > > >  gstreamer1.0-ptest \
> > > > +json-c-ptest \
> > > >  libevent-ptest \
> > > >  libgcrypt-ptest \
> > > >  lttng-tools-ptest \
> > > 
> > > How long do the tests take to execute? Do they have to be added
> > > to
> > > the
> > > slow list?
> > > 
> > > Alex
> > > 
> > > 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#169270): 
https://lists.openembedded.org/g/openembedded-core/message/169270
Mute This Topic: https://lists.openembedded.org/mt/92944223/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH v2] json-c: Add ptest for json-c

2022-08-11 Thread Simone Weiss
Hi,

For me it took around ~500 seconds. I considered it as slow, as
`PTESTS_FAST` should take around ~30 seconds according to the comment
on ptest-packagelists.inc.

Simone
On Thu, 2022-08-11 at 10:23 +0200, Alexander Kanavin via
lists.openembedded.org wrote:
> CAUTION: This email originated from outside of the Elektrobit
> organization. Do not click links or open attachments unless you
> recognize the sender and know the content is safe.
> 
> 
> On Wed, 10 Aug 2022 at 21:40, Simone Weiss <
> simone.we...@elektrobit.com> wrote:
> > --- a/meta/conf/distro/include/ptest-packagelists.inc
> > +++ b/meta/conf/distro/include/ptest-packagelists.inc
> > @@ -87,6 +87,7 @@ PTESTS_SLOW = "\
> >  findutils-ptest \
> >  glib-2.0-ptest \
> >  gstreamer1.0-ptest \
> > +json-c-ptest \
> >  libevent-ptest \
> >  libgcrypt-ptest \
> >  lttng-tools-ptest \
> 
> How long do the tests take to execute? Do they have to be added to
> the
> slow list?
> 
> Alex
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#169247): 
https://lists.openembedded.org/g/openembedded-core/message/169247
Mute This Topic: https://lists.openembedded.org/mt/92944223/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v2] json-c: Add ptest for json-c

2022-08-10 Thread Simone Weiss
Adapt json-c recipe to compile and deploy a ptest for json-c.
Also add a small script for executing the tests.
All tests were successful on a trial

Signed-off-by: Simone Weiß 
Signed-off-by: Kai Tomerius 
---
 .../distro/include/ptest-packagelists.inc |  1 +
 meta/recipes-devtools/json-c/json-c/run-ptest | 20 +++
 meta/recipes-devtools/json-c/json-c_0.16.bb   | 16 +--
 3 files changed, 35 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-devtools/json-c/json-c/run-ptest

diff --git a/meta/conf/distro/include/ptest-packagelists.inc 
b/meta/conf/distro/include/ptest-packagelists.inc
index 6c4339e3e1..ec82df65a2 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -87,6 +87,7 @@ PTESTS_SLOW = "\
 findutils-ptest \
 glib-2.0-ptest \
 gstreamer1.0-ptest \
+json-c-ptest \
 libevent-ptest \
 libgcrypt-ptest \
 lttng-tools-ptest \
diff --git a/meta/recipes-devtools/json-c/json-c/run-ptest 
b/meta/recipes-devtools/json-c/json-c/run-ptest
new file mode 100644
index 00..9ee6095ea2
--- /dev/null
+++ b/meta/recipes-devtools/json-c/json-c/run-ptest
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# This script is used to run json-c test suites
+cd tests
+
+ret_val=0
+for i in test*.test; do
+# test_basic is not an own testcase, just
+# contains common code of other tests
+if [ "$i" != "test_basic.test" ]; then
+if ./$i > json-c_test.log 2>&1 ; then
+echo PASS: $i
+else
+ret_val=1
+echo FAIL: $i
+fi
+fi
+done
+
+exit $ret_val
diff --git a/meta/recipes-devtools/json-c/json-c_0.16.bb 
b/meta/recipes-devtools/json-c/json-c_0.16.bb
index fdec5ec9af..50431081bb 100644
--- a/meta/recipes-devtools/json-c/json-c_0.16.bb
+++ b/meta/recipes-devtools/json-c/json-c_0.16.bb
@@ -4,7 +4,10 @@ HOMEPAGE = "https://github.com/json-c/json-c/wiki;
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2"
 
-SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz;
+SRC_URI = " \
+https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz \
+file://run-ptest \
+"
 
 SRC_URI[sha256sum] = 
"8e45ac8f96ec7791eaf3bb7ee50e9c2100bbbc87b8d0f1d030c5ba8a0288d96b"
 
@@ -13,6 +16,15 @@ UPSTREAM_CHECK_REGEX = "json-c-(?P\d+(\.\d+)+)-\d+"
 
 RPROVIDES:${PN} = "libjson"
 
-inherit cmake
+inherit cmake ptest
+
+do_install_ptest() {
+install -d ${D}/${PTEST_PATH}/tests
+install ${B}/tests/test* ${D}/${PTEST_PATH}/tests
+install ${S}/tests/*.test ${D}/${PTEST_PATH}/tests
+install ${S}/tests/*.expected ${D}/${PTEST_PATH}/tests
+install ${S}/tests/test-defs.sh ${D}/${PTEST_PATH}/tests
+install ${S}/tests/valid*json ${D}/${PTEST_PATH}/tests
+}
 
 BBCLASSEXTEND = "native nativesdk"
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#169201): 
https://lists.openembedded.org/g/openembedded-core/message/169201
Mute This Topic: https://lists.openembedded.org/mt/92944223/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] json-c: Add ptest for json-c

2022-05-30 Thread Simone Weiss
Hi,

thanks for notifying, I'll see if I can fix this...

Kind Regards,

Simone
On Mon, 2022-05-30 at 22:41 +0200, Luca Ceresoli wrote:
> CAUTION: This email originated from outside of the Elektrobit
> organization. Do not click links or open attachments unless you
> recognize the sender and know the content is safe.
> 
> 
> Hi Simone,
> 
> Il giorno Mon, 30 May 2022 11:47:45 +0200
> "Simone Weiss"  ha scritto:
> 
> > Also add a script for executing the ptests. All tests were
> > sucessful on a trial
> > run. Also add a small script for running the tests.
> > 
> > Signed-off-by: Simone Weiß 
> > Signed-off-by: Kai Tomerius 
> 
> This patch causes reproducibility build failures:
> 
> 
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fautobuilder.yoctoproject.org%2Ftyphoon%2F%23%2Fbuilders%2F117%2Fbuilds%2F936%2Fsteps%2F12%2Flogs%2Fstdiodata=05%7C01%7C%7Ce317d8b365b4486fbbce08da427cbf7b%7Ce764c36b012e4216910d8fd16283182d%7C0%7C0%7C637895400815424306%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=c7T%2Fi5NMND8iBU31BAjOZfYdIgyqU46yPtilQC7Z%2FFw%3Dreserved=0
> 
> --
> Luca Ceresoli, Bootlin
> Embedded Linux and Kernel engineering
> 
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbootlin.com%2Fdata=05%7C01%7C%7Ce317d8b365b4486fbbce08da427cbf7b%7Ce764c36b012e4216910d8fd16283182d%7C0%7C0%7C637895400815424306%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=uvfd7vyS9Y33UtAWHPRN%2B7xLOQx4%2BwmBrMo9H7CIevw%3Dreserved=0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#166303): 
https://lists.openembedded.org/g/openembedded-core/message/166303
Mute This Topic: https://lists.openembedded.org/mt/91427504/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] json-c: Add ptest for json-c

2022-05-30 Thread Simone Weiss
Also add a script for executing the ptests. All tests were sucessful on a trial
run. Also add a small script for running the tests.

Signed-off-by: Simone Weiß 
Signed-off-by: Kai Tomerius 
---
 .../distro/include/ptest-packagelists.inc |  1 +
 meta/recipes-devtools/json-c/json-c/run-ptest | 20 +++
 meta/recipes-devtools/json-c/json-c_0.16.bb   | 15 --
 3 files changed, 34 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-devtools/json-c/json-c/run-ptest

diff --git a/meta/conf/distro/include/ptest-packagelists.inc 
b/meta/conf/distro/include/ptest-packagelists.inc
index a1ead90649..0bfcb60c76 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -22,6 +22,7 @@ PTESTS_FAST = "\
 gettext-ptest \
 glib-networking-ptest \
 gzip-ptest \
+json-c-ptest \
 json-glib-ptest \
 libconvert-asn1-perl-ptest \
 liberror-perl-ptest \
diff --git a/meta/recipes-devtools/json-c/json-c/run-ptest 
b/meta/recipes-devtools/json-c/json-c/run-ptest
new file mode 100644
index 00..9e96a8e755
--- /dev/null
+++ b/meta/recipes-devtools/json-c/json-c/run-ptest
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# This script is used to run json-c test suites
+cd tests
+
+ret_val=0
+for i in test*.test; do
+   # test_basic is not a own testcase, just
+   # contains common code of other tests
+   if [ "$i" != "test_basic.test" ]; then
+   if ./$i > /dev/null 2>&1 ; then
+   echo PASS: $i
+   else
+   ret_val=1
+   echo FAIL: $i
+   fi
+   fi
+done
+
+exit $ret_val
diff --git a/meta/recipes-devtools/json-c/json-c_0.16.bb 
b/meta/recipes-devtools/json-c/json-c_0.16.bb
index fdec5ec9af..3fa5ce2c49 100644
--- a/meta/recipes-devtools/json-c/json-c_0.16.bb
+++ b/meta/recipes-devtools/json-c/json-c_0.16.bb
@@ -4,7 +4,10 @@ HOMEPAGE = "https://github.com/json-c/json-c/wiki;
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2"
 
-SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz;
+SRC_URI = " \
+https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz \
+file://run-ptest \
+"
 
 SRC_URI[sha256sum] = 
"8e45ac8f96ec7791eaf3bb7ee50e9c2100bbbc87b8d0f1d030c5ba8a0288d96b"
 
@@ -13,6 +16,14 @@ UPSTREAM_CHECK_REGEX = "json-c-(?P\d+(\.\d+)+)-\d+"
 
 RPROVIDES:${PN} = "libjson"
 
-inherit cmake
+inherit cmake ptest
+
+do_install_ptest() {
+cp -r ${B}/tests ${D}/${PTEST_PATH}
+cp -r ${S}/tests/*.test ${D}/${PTEST_PATH}/tests
+cp -r ${S}/tests/*.expected ${D}/${PTEST_PATH}/tests
+cp -r ${S}/tests/test-defs.sh ${D}/${PTEST_PATH}/tests
+cp -r ${S}/tests/valid*json ${D}/${PTEST_PATH}/tests
+}
 
 BBCLASSEXTEND = "native nativesdk"
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#166278): 
https://lists.openembedded.org/g/openembedded-core/message/166278
Mute This Topic: https://lists.openembedded.org/mt/91427504/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] json-c: Add ptest for json-c

2022-05-30 Thread Simone Weiss
Also add a script for executing the ptests. All tests were sucessful on a trial
run.

Signed-off-by: Simone Weiß 
Signed-off-by: Kai Tomerius 
---
 meta/conf/distro/include/ptest-packagelists.inc |  1 +
 meta/recipes-devtools/json-c/json-c_0.16.bb | 15 +--
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/meta/conf/distro/include/ptest-packagelists.inc 
b/meta/conf/distro/include/ptest-packagelists.inc
index a1ead90649..0bfcb60c76 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -22,6 +22,7 @@ PTESTS_FAST = "\
 gettext-ptest \
 glib-networking-ptest \
 gzip-ptest \
+json-c-ptest \
 json-glib-ptest \
 libconvert-asn1-perl-ptest \
 liberror-perl-ptest \
diff --git a/meta/recipes-devtools/json-c/json-c_0.16.bb 
b/meta/recipes-devtools/json-c/json-c_0.16.bb
index fdec5ec9af..3fa5ce2c49 100644
--- a/meta/recipes-devtools/json-c/json-c_0.16.bb
+++ b/meta/recipes-devtools/json-c/json-c_0.16.bb
@@ -4,7 +4,10 @@ HOMEPAGE = "https://github.com/json-c/json-c/wiki;
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2"
 
-SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz;
+SRC_URI = " \
+https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz \
+file://run-ptest \
+"
 
 SRC_URI[sha256sum] = 
"8e45ac8f96ec7791eaf3bb7ee50e9c2100bbbc87b8d0f1d030c5ba8a0288d96b"
 
@@ -13,6 +16,14 @@ UPSTREAM_CHECK_REGEX = "json-c-(?P\d+(\.\d+)+)-\d+"
 
 RPROVIDES:${PN} = "libjson"
 
-inherit cmake
+inherit cmake ptest
+
+do_install_ptest() {
+cp -r ${B}/tests ${D}/${PTEST_PATH}
+cp -r ${S}/tests/*.test ${D}/${PTEST_PATH}/tests
+cp -r ${S}/tests/*.expected ${D}/${PTEST_PATH}/tests
+cp -r ${S}/tests/test-defs.sh ${D}/${PTEST_PATH}/tests
+cp -r ${S}/tests/valid*json ${D}/${PTEST_PATH}/tests
+}
 
 BBCLASSEXTEND = "native nativesdk"
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#166275): 
https://lists.openembedded.org/g/openembedded-core/message/166275
Mute This Topic: https://lists.openembedded.org/mt/91427504/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



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

2022-05-04 Thread Simone Weiss
Add a ptest for libgcript to core-image-ptest-all. All tests passed on a trial
run.

Signed-off-by: Simone Weiss 
---
 meta/conf/distro/include/ptest-packagelists.inc   |  1 +
 meta/recipes-support/libgcrypt/files/run-ptest|  3 +++
 .../recipes-support/libgcrypt/libgcrypt_1.10.1.bb | 15 ++-
 3 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-support/libgcrypt/files/run-ptest

diff --git a/meta/conf/distro/include/ptest-packagelists.inc 
b/meta/conf/distro/include/ptest-packagelists.inc
index 54a290871e..a1ead90649 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -87,6 +87,7 @@ PTESTS_SLOW = "\
 glib-2.0-ptest \
 gstreamer1.0-ptest \
 libevent-ptest \
+libgcrypt-ptest \
 lttng-tools-ptest \
 openssh-ptest \
 openssl-ptest \
diff --git a/meta/recipes-support/libgcrypt/files/run-ptest 
b/meta/recipes-support/libgcrypt/files/run-ptest
new file mode 100644
index 00..4818a061b4
--- /dev/null
+++ b/meta/recipes-support/libgcrypt/files/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+make -C build/tests runtest-TESTS
diff --git a/meta/recipes-support/libgcrypt/libgcrypt_1.10.1.bb 
b/meta/recipes-support/libgcrypt/libgcrypt_1.10.1.bb
index 251e0d0348..aa83de226d 100644
--- a/meta/recipes-support/libgcrypt/libgcrypt_1.10.1.bb
+++ b/meta/recipes-support/libgcrypt/libgcrypt_1.10.1.bb
@@ -18,6 +18,7 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
 "
 
 DEPENDS = "libgpg-error"
+RDEPENDS:${PN}-ptest = "bash"
 
 UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html;
 SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.bz2 \
@@ -25,6 +26,7 @@ SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.bz2 \

file://0003-tests-bench-slope.c-workaround-ICE-failure-on-mips-w.patch \

file://0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch \

file://0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch \
+   file://run-ptest \
"
 SRC_URI[sha256sum] = 
"ef14ae546b0084cd84259f61a55e07a38c3b53afc0f546bffcef2f01baffe9de"
 
@@ -33,11 +35,13 @@ CVE_CHECK_IGNORE += "CVE-2018-12433 CVE-2018-12438"
 
 BINCONFIG = "${bindir}/libgcrypt-config"
 
-inherit autotools texinfo binconfig-disabled pkgconfig
+inherit autotools texinfo binconfig-disabled pkgconfig ptest
 
 EXTRA_OECONF = "--disable-asm"
 EXTRA_OEMAKE:class-target = "LIBTOOLFLAGS='--tag=CC'"
 
+PRIVATE_LIBS:${PN}-ptest:append = " libgcrypt.so.20"
+
 PACKAGECONFIG ??= "capabilities"
 PACKAGECONFIG[capabilities] = 
"--with-capabilities,--without-capabilities,libcap"
 
@@ -52,6 +56,15 @@ do_install:append() {
install -m 0644 ${B}/src/libgcrypt.pc ${D}/${libdir}/pkgconfig/
 }
 
+do_install_ptest() {
+cp -r --preserve=mode,links -v ${S} ${D}${PTEST_PATH}
+cp -r --preserve=mode,links -v ${B} ${D}${PTEST_PATH}
+rm ${D}${PTEST_PATH}/build/cipher/gost-s-box
+rm ${D}${PTEST_PATH}/build/doc/yat2m
+find ${D}/${PTEST_PATH}/build -name "*.cmake" -or -name "Makefile" \
+| xargs sed -e "s|${WORKDIR}|${PTEST_PATH}|g" -e 
"s|${WORKDIR}/recipe-sysroot-native||g" -i
+}
+
 PACKAGES =+ "dumpsexp-dev"
 
 FILES:${PN}-dev += "${bindir}/hmac256"
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#165217): 
https://lists.openembedded.org/g/openembedded-core/message/165217
Mute This Topic: https://lists.openembedded.org/mt/90885670/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v3] libgpg-error: Add ptest

2022-04-19 Thread Simone Weiss
Add a ptest for libgpg-error to core-image-ptest-all. Avoid refreshing the
Makefile in qemu as this would fail and is not needed. All tests passed on
a trial run.

Signed-off-by: Simone Weiss 
---
 meta/conf/distro/include/ptest-packagelists.inc|  1 +
 .../libgpg-error/libgpg-error/run-ptest|  3 +++
 .../libgpg-error/libgpg-error_1.44.bb  | 14 +-
 3 files changed, 17 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-support/libgpg-error/libgpg-error/run-ptest

diff --git a/meta/conf/distro/include/ptest-packagelists.inc 
b/meta/conf/distro/include/ptest-packagelists.inc
index b51cce4d9e..54a290871e 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -25,6 +25,7 @@ PTESTS_FAST = "\
 json-glib-ptest \
 libconvert-asn1-perl-ptest \
 liberror-perl-ptest \
+libgpg-error-ptest\
 libnl-ptest \
 libmodule-build-perl-ptest \
 libpcre-ptest \
diff --git a/meta/recipes-support/libgpg-error/libgpg-error/run-ptest 
b/meta/recipes-support/libgpg-error/libgpg-error/run-ptest
new file mode 100644
index 00..2d23159eb0
--- /dev/null
+++ b/meta/recipes-support/libgpg-error/libgpg-error/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+make -o Makefile runtest-TESTS
diff --git a/meta/recipes-support/libgpg-error/libgpg-error_1.44.bb 
b/meta/recipes-support/libgpg-error/libgpg-error_1.44.bb
index 41adad0ede..f5b482f4c9 100644
--- a/meta/recipes-support/libgpg-error/libgpg-error_1.44.bb
+++ b/meta/recipes-support/libgpg-error/libgpg-error_1.44.bb
@@ -17,13 +17,16 @@ UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html;
 SRC_URI = "${GNUPG_MIRROR}/libgpg-error/libgpg-error-${PV}.tar.bz2 \
file://pkgconfig.patch \
file://0001-Do-not-fail-when-testing-config-scripts.patch \
+   file://run-ptest \
"
 
 SRC_URI[sha256sum] = 
"8e3d2da7a8b9a104dd8e9212ebe8e0daf86aa838cc1314ba6bc4de8f2d8a1ff9"
 
 BINCONFIG = "${bindir}/gpg-error-config"
 
-inherit autotools binconfig-disabled pkgconfig gettext multilib_header 
multilib_script
+inherit autotools binconfig-disabled pkgconfig gettext multilib_header 
multilib_script ptest
+
+RDEPENDS:${PN}-ptest:append = " make"
 
 MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/gpgrt-config"
 
@@ -35,6 +38,15 @@ do_install:append() {
oe_multilib_header gpg-error.h gpgrt.h
 }
 
+do_compile_ptest() {
+oe_runmake -C tests buildtest-TESTS
+}
+
+do_install_ptest() {
+install ${B}/tests/t-*[!\.o] ${D}${PTEST_PATH}
+install ${B}/tests/Makefile ${D}${PTEST_PATH}
+}
+
 FILES:${PN}-dev += "${bindir}/gpg-error"
 FILES:${PN}-doc += "${datadir}/libgpg-error/errorref.txt"
 
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#164628): 
https://lists.openembedded.org/g/openembedded-core/message/164628
Mute This Topic: https://lists.openembedded.org/mt/90560681/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v2] libgpg-error: Add ptest

2022-04-19 Thread Simone Weiss
Add a ptest for libgpg-error to core-image-ptest-all. Avoid refreshing the
Makefile in qemu as this would fail and is not needed. All tests passed on
a trial run.

Signed-off-by: Simone Weiss 
---
 meta/conf/distro/include/ptest-packagelists.inc|  1 +
 .../libgpg-error/libgpg-error/run-ptest|  3 +++
 .../libgpg-error/libgpg-error_1.44.bb  | 14 +-
 3 files changed, 17 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-support/libgpg-error/libgpg-error/run-ptest

diff --git a/meta/conf/distro/include/ptest-packagelists.inc 
b/meta/conf/distro/include/ptest-packagelists.inc
index b51cce4d9e..54a290871e 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -25,6 +25,7 @@ PTESTS_FAST = "\
 json-glib-ptest \
 libconvert-asn1-perl-ptest \
 liberror-perl-ptest \
+libgpg-error-ptest\
 libnl-ptest \
 libmodule-build-perl-ptest \
 libpcre-ptest \
diff --git a/meta/recipes-support/libgpg-error/libgpg-error/run-ptest 
b/meta/recipes-support/libgpg-error/libgpg-error/run-ptest
new file mode 100644
index 00..2d23159eb0
--- /dev/null
+++ b/meta/recipes-support/libgpg-error/libgpg-error/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+make -o Makefile runtest-TESTS
diff --git a/meta/recipes-support/libgpg-error/libgpg-error_1.44.bb 
b/meta/recipes-support/libgpg-error/libgpg-error_1.44.bb
index 41adad0ede..174350f6f5 100644
--- a/meta/recipes-support/libgpg-error/libgpg-error_1.44.bb
+++ b/meta/recipes-support/libgpg-error/libgpg-error_1.44.bb
@@ -17,13 +17,16 @@ UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html;
 SRC_URI = "${GNUPG_MIRROR}/libgpg-error/libgpg-error-${PV}.tar.bz2 \
file://pkgconfig.patch \
file://0001-Do-not-fail-when-testing-config-scripts.patch \
+   file://run-ptest \
"
 
 SRC_URI[sha256sum] = 
"8e3d2da7a8b9a104dd8e9212ebe8e0daf86aa838cc1314ba6bc4de8f2d8a1ff9"
 
 BINCONFIG = "${bindir}/gpg-error-config"
 
-inherit autotools binconfig-disabled pkgconfig gettext multilib_header 
multilib_script
+inherit autotools binconfig-disabled pkgconfig gettext multilib_header 
multilib_script ptest
+
+RDEPENDS_${PN}-ptest:append = " make"
 
 MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/gpgrt-config"
 
@@ -35,6 +38,15 @@ do_install:append() {
oe_multilib_header gpg-error.h gpgrt.h
 }
 
+do_compile_ptest() {
+oe_runmake -C tests buildtest-TESTS
+}
+
+do_install_ptest() {
+install ${B}/tests/t-*[!\.o] ${D}${PTEST_PATH}
+install ${B}/tests/Makefile ${D}${PTEST_PATH}
+}
+
 FILES:${PN}-dev += "${bindir}/gpg-error"
 FILES:${PN}-doc += "${datadir}/libgpg-error/errorref.txt"
 
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#164625): 
https://lists.openembedded.org/g/openembedded-core/message/164625
Mute This Topic: https://lists.openembedded.org/mt/90559471/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] libgpg-error: Add ptest

2022-04-06 Thread Simone Weiss
Add a ptest for libgpg-error to core-image-ptest-all. All tests passed on a
trial run.

Signed-off-by: Simone Weiss 
---
 meta/conf/distro/include/ptest-packagelists.inc|  1 +
 .../libgpg-error/libgpg-error/run-ptest|  3 +++
 .../libgpg-error/libgpg-error_1.44.bb  | 14 +-
 3 files changed, 17 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-support/libgpg-error/libgpg-error/run-ptest

diff --git a/meta/conf/distro/include/ptest-packagelists.inc 
b/meta/conf/distro/include/ptest-packagelists.inc
index b51cce4d9e..54a290871e 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -25,6 +25,7 @@ PTESTS_FAST = "\
 json-glib-ptest \
 libconvert-asn1-perl-ptest \
 liberror-perl-ptest \
+libgpg-error-ptest\
 libnl-ptest \
 libmodule-build-perl-ptest \
 libpcre-ptest \
diff --git a/meta/recipes-support/libgpg-error/libgpg-error/run-ptest 
b/meta/recipes-support/libgpg-error/libgpg-error/run-ptest
new file mode 100644
index 00..5eb4e8c6f3
--- /dev/null
+++ b/meta/recipes-support/libgpg-error/libgpg-error/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+make -k runtest-TESTS
diff --git a/meta/recipes-support/libgpg-error/libgpg-error_1.44.bb 
b/meta/recipes-support/libgpg-error/libgpg-error_1.44.bb
index 41adad0ede..174350f6f5 100644
--- a/meta/recipes-support/libgpg-error/libgpg-error_1.44.bb
+++ b/meta/recipes-support/libgpg-error/libgpg-error_1.44.bb
@@ -17,13 +17,16 @@ UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html;
 SRC_URI = "${GNUPG_MIRROR}/libgpg-error/libgpg-error-${PV}.tar.bz2 \
file://pkgconfig.patch \
file://0001-Do-not-fail-when-testing-config-scripts.patch \
+   file://run-ptest \
"
 
 SRC_URI[sha256sum] = 
"8e3d2da7a8b9a104dd8e9212ebe8e0daf86aa838cc1314ba6bc4de8f2d8a1ff9"
 
 BINCONFIG = "${bindir}/gpg-error-config"
 
-inherit autotools binconfig-disabled pkgconfig gettext multilib_header 
multilib_script
+inherit autotools binconfig-disabled pkgconfig gettext multilib_header 
multilib_script ptest
+
+RDEPENDS_${PN}-ptest:append = " make"
 
 MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/gpgrt-config"
 
@@ -35,6 +38,15 @@ do_install:append() {
oe_multilib_header gpg-error.h gpgrt.h
 }
 
+do_compile_ptest() {
+oe_runmake -C tests buildtest-TESTS
+}
+
+do_install_ptest() {
+install ${B}/tests/t-*[!\.o] ${D}${PTEST_PATH}
+install ${B}/tests/Makefile ${D}${PTEST_PATH}
+}
+
 FILES:${PN}-dev += "${bindir}/gpg-error"
 FILES:${PN}-doc += "${datadir}/libgpg-error/errorref.txt"
 
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#164082): 
https://lists.openembedded.org/g/openembedded-core/message/164082
Mute This Topic: https://lists.openembedded.org/mt/90289917/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



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

2022-04-04 Thread Simone Weiss
Hello,

Thanks for the reply. Sure, I can also submit the patch to popt first.
Regarding David's mail address: The person does not work at my company
anymore, hence this mail address is not valid. What would be suggested
in this case?

Thanks,
Simone
As it is my first time submitting here
On Fri, 2022-04-01 at 17:16 +0200, Alexander Kanavin via
lists.openembedded.org wrote:
> CAUTION: This email originated from outside of the Elektrobit
> organization. Do not click links or open attachments unless you
> recognize the sender and know the content is safe.
> 
> 
> Also David's email seems incorrect?
> 
> Fehler bei der Nachrichtenzustellung an folgende Empfänger oder
> Gruppen:
> 
> David Niederpruem (david.niederpr...@elektrobit.com)
> 
> Die eingegebene E-Mail-Adresse konnte nicht gefunden werden.
> Überprüfen Sie die E-Mail-Adresse des Empfängers, und versuchen Sie,
> die Nachricht erneut zu senden. Wenn das Problem weiterhin besteht,
> wenden Sie sich an Ihren E-Mail-Administrator.
> 
> 
> Alex
> 
> On Fri, 1 Apr 2022 at 16:46, Simone Weiss <
> simone.we...@elektrobit.com> wrote:
> > 
> > Add a ptest for popt to core-image-ptest-all. Provide a patch to
> > popt to
> > adopt the test format to "simple test" and a script for running the
> > test.
> > All tests passed on a trial run.
> > 
> > Signed-off-by: Simone Weiss 
> > Signed-off-by: David Niederpruem 
> > ---
> >  .../distro/include/ptest-packagelists.inc |  1 +
> >  ...01-popt-test-output-format-for-ptest.patch | 68
> > +++
> >  meta/recipes-support/popt/popt/run-ptest  |  3 +
> >  meta/recipes-support/popt/popt_1.18.bb| 21 +-
> >  4 files changed, 91 insertions(+), 2 deletions(-)
> >  create mode 100644 meta/recipes-support/popt/popt/0001-popt-test-
> > output-format-for-ptest.patch
> >  create mode 100644 meta/recipes-support/popt/popt/run-ptest
> > 
> > diff --git a/meta/conf/distro/include/ptest-packagelists.inc
> > b/meta/conf/distro/include/ptest-packagelists.inc
> > index ac3295d1aa..b51cce4d9e 100644
> > --- a/meta/conf/distro/include/ptest-packagelists.inc
> > +++ b/meta/conf/distro/include/ptest-packagelists.inc
> > @@ -48,6 +48,7 @@ PTESTS_FAST = "\
> >  opkg-ptest \
> >  pango-ptest \
> >  parted-ptest \
> > +popt-ptest \
> >  python3-atomicwrites-ptest \
> >  python3-bcrypt-ptest \
> >  python3-hypothesis-ptest \
> > diff --git a/meta/recipes-support/popt/popt/0001-popt-test-output-
> > format-for-ptest.patch b/meta/recipes-support/popt/popt/0001-popt-
> > test-output-format-for-ptest.patch
> > new file mode 100644
> > index 00..020949cc34
> > --- /dev/null
> > +++ b/meta/recipes-support/popt/popt/0001-popt-test-output-format-
> > for-ptest.patch
> > @@ -0,0 +1,68 @@
> > +From 330b77081c3a4c7ae76cb08602db385b40fa7ff7 Mon Sep 17 00:00:00
> > 2001
> > +From: Simone Weiss 
> > +Date: Mon, 13 Dec 2021 09:29:53 +
> > +Subject: [PATCH] popt test output format for ptest
> > +
> > +patch test output format to match simple-test as it is used in
> > ptests.
> > +
> > +Upstream-Status: Pending
> > +
> > +Signed-off-by: Simone Weiss 
> > +Signed-off-by: David Niederpruem  > >
> > +---
> > + tests/testit.sh | 20 
> > + 1 file changed, 8 insertions(+), 12 deletions(-)
> > +
> > +diff --git a/tests/testit.sh b/tests/testit.sh
> > +index 2a7b4aa..50b42e2 100755
> > +--- a/tests/testit.sh
> >  b/tests/testit.sh
> > +@@ -5,12 +5,11 @@ run() {
> > + name=$1; shift
> > + answer=$1; shift
> > +
> > +-echo Running test $name.
> > +-
> > + result=`HOME=$builddir $builddir/$prog $*`
> > + if [ "$answer" != "$result" ]; then
> > +-  echo "Test \"$prog $*\" failed with: \"$result\" !=
> > \"$answer\" "
> > +-  exit 2
> > ++echo "FAIL: $name"
> > ++else
> > ++echo "PASS: $name"
> > + fi
> > + }
> > +
> > +@@ -23,17 +22,17 @@ run_diff() {
> > + out=$builddir/tmp.out
> > + diff_file=$builddir/tmp.diff
> > +
> > +-echo Running test $name.
> > +-
> > + $builddir/$prog $in_file > $out
> > + ret=$?
> > + diff $out $answer_file > $diff_file
> > + diff_ret=$?
> > +
> > + if [ "$diff_ret" != "0" ]; then
> > +-   echo "Test \"$nam

[OE-core] [PATCH] popt: add ptest

2022-04-01 Thread Simone Weiss
Add a ptest for popt to core-image-ptest-all. Provide a patch to popt to
adopt the test format to "simple test" and a script for running the test.
All tests passed on a trial run.

Signed-off-by: Simone Weiss 
Signed-off-by: David Niederpruem 
---
 .../distro/include/ptest-packagelists.inc |  1 +
 ...01-popt-test-output-format-for-ptest.patch | 68 +++
 meta/recipes-support/popt/popt/run-ptest  |  3 +
 meta/recipes-support/popt/popt_1.18.bb| 21 +-
 4 files changed, 91 insertions(+), 2 deletions(-)
 create mode 100644 
meta/recipes-support/popt/popt/0001-popt-test-output-format-for-ptest.patch
 create mode 100644 meta/recipes-support/popt/popt/run-ptest

diff --git a/meta/conf/distro/include/ptest-packagelists.inc 
b/meta/conf/distro/include/ptest-packagelists.inc
index ac3295d1aa..b51cce4d9e 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -48,6 +48,7 @@ PTESTS_FAST = "\
 opkg-ptest \
 pango-ptest \
 parted-ptest \
+popt-ptest \
 python3-atomicwrites-ptest \
 python3-bcrypt-ptest \
 python3-hypothesis-ptest \
diff --git 
a/meta/recipes-support/popt/popt/0001-popt-test-output-format-for-ptest.patch 
b/meta/recipes-support/popt/popt/0001-popt-test-output-format-for-ptest.patch
new file mode 100644
index 00..020949cc34
--- /dev/null
+++ 
b/meta/recipes-support/popt/popt/0001-popt-test-output-format-for-ptest.patch
@@ -0,0 +1,68 @@
+From 330b77081c3a4c7ae76cb08602db385b40fa7ff7 Mon Sep 17 00:00:00 2001
+From: Simone Weiss 
+Date: Mon, 13 Dec 2021 09:29:53 +
+Subject: [PATCH] popt test output format for ptest
+
+patch test output format to match simple-test as it is used in ptests.
+
+Upstream-Status: Pending
+
+Signed-off-by: Simone Weiss 
+Signed-off-by: David Niederpruem 
+---
+ tests/testit.sh | 20 
+ 1 file changed, 8 insertions(+), 12 deletions(-)
+
+diff --git a/tests/testit.sh b/tests/testit.sh
+index 2a7b4aa..50b42e2 100755
+--- a/tests/testit.sh
 b/tests/testit.sh
+@@ -5,12 +5,11 @@ run() {
+ name=$1; shift
+ answer=$1; shift
+ 
+-echo Running test $name.
+-
+ result=`HOME=$builddir $builddir/$prog $*`
+ if [ "$answer" != "$result" ]; then
+-  echo "Test \"$prog $*\" failed with: \"$result\" != \"$answer\" "
+-  exit 2
++echo "FAIL: $name"
++else
++echo "PASS: $name"
+ fi
+ }
+ 
+@@ -23,17 +22,17 @@ run_diff() {
+ out=$builddir/tmp.out
+ diff_file=$builddir/tmp.diff
+ 
+-echo Running test $name.
+-
+ $builddir/$prog $in_file > $out
+ ret=$?
+ diff $out $answer_file > $diff_file
+ diff_ret=$?
+ 
+ if [ "$diff_ret" != "0" ]; then
+-   echo "Test \"$name\" failed output is in $out, diff is:"
+-   cat $diff_file
+-   exit 2
++echo "FAIL: $name"
++echo "diff is:"
++cat $diff_file
++else
++echo "PASS: $name"
+ fi
+ rm $out $diff_file
+ }
+@@ -174,6 +173,3 @@ Help options:
+ #run_diff test3 "test3 - 51" test3-data/01.input test3-data/01.answer
+ #run_diff test3 "test3 - 52" test3-data/02.input test3-data/02.answer
+ #run_diff test3 "test3 - 53" test3-data/03.input test3-data/03.answer
+-
+-echo ""
+-echo "Passed."
+-- 
+2.17.1
+
diff --git a/meta/recipes-support/popt/popt/run-ptest 
b/meta/recipes-support/popt/popt/run-ptest
new file mode 100644
index 00..85754035d0
--- /dev/null
+++ b/meta/recipes-support/popt/popt/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+./testit.sh
diff --git a/meta/recipes-support/popt/popt_1.18.bb 
b/meta/recipes-support/popt/popt_1.18.bb
index 057c44f223..af8add4ad6 100644
--- a/meta/recipes-support/popt/popt_1.18.bb
+++ b/meta/recipes-support/popt/popt_1.18.bb
@@ -8,9 +8,26 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=cb0613c30af2a8249b8dcc67d3edb06d"
 
 DEPENDS = "virtual/libiconv"
 
-SRC_URI = "http://ftp.rpm.org/popt/releases/popt-1.x/${BP}.tar.gz;
+SRC_URI = "\
+http://ftp.rpm.org/popt/releases/popt-1.x/${BP}.tar.gz \
+file://0001-popt-test-output-format-for-ptest.patch \
+file://run-ptest \
+"
 SRC_URI[sha256sum] = 
"5159bc03a20b28ce363aa96765f37df99ea4d8850b1ece17d1e6ad5c24fdc5d1"
 
-inherit autotools gettext
+inherit autotools gettext ptest
+
+RDEPENDS_${PN}-ptest += "bash"
+
+do_compile_ptest() {
+sed 's#lt-test1#test1#g' ${S}/tests/testit.sh > ${B}/tests/testit.sh
+}
+
+do_install_ptest() {
+install ${B}/tests/.libs/test* ${D}/${PTEST_PATH}
+install ${B}/tests/.libs/tdict ${D}/${PTEST_PATH}
+install ${B}/tests/testit.sh ${D}/${PTEST_PATH}
+install ${B}/tests/test-poptrc ${D}/${PTEST_PATH}
+}
 
 BBCLASSEXTEND = "native nativesdk&q