* [PATCH] json-c: Add ptest for json-c
@ 2022-05-30 9:47 Simone Weiss
2022-05-30 10:30 ` [OE-core] " Alexander Kanavin
2022-05-30 20:41 ` Luca Ceresoli
0 siblings, 2 replies; 6+ messages in thread
From: Simone Weiss @ 2022-05-30 9:47 UTC (permalink / raw)
To: openembedded-core; +Cc: Simone Weiss, Kai Tomerius
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ß <simone.weiss@elektrobit.com>
Signed-off-by: Kai Tomerius <kai.tomerius@elektrobit.com>
---
.../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 0000000000..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<pver>\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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH] json-c: Add ptest for json-c
2022-05-30 9:47 [PATCH] json-c: Add ptest for json-c Simone Weiss
@ 2022-05-30 10:30 ` Alexander Kanavin
2022-05-30 20:41 ` Luca Ceresoli
1 sibling, 0 replies; 6+ messages in thread
From: Alexander Kanavin @ 2022-05-30 10:30 UTC (permalink / raw)
To: Simone Weiss; +Cc: OE-core, Kai Tomerius
On Mon, 30 May 2022 at 11:48, Simone Weiss <simone.weiss@elektrobit.com> wrote:
> + if ./$i > /dev/null 2>&1 ; then
Should the output be completely discarded like this? Maybe it's better
to have it printed, especially if something fails?
Alex
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH] json-c: Add ptest for json-c
2022-05-30 9:47 [PATCH] json-c: Add ptest for json-c Simone Weiss
2022-05-30 10:30 ` [OE-core] " Alexander Kanavin
@ 2022-05-30 20:41 ` Luca Ceresoli
2022-05-31 5:44 ` Weiß, Simone
1 sibling, 1 reply; 6+ messages in thread
From: Luca Ceresoli @ 2022-05-30 20:41 UTC (permalink / raw)
To: Simone Weiss; +Cc: openembedded-core, Kai Tomerius
Hi Simone,
Il giorno Mon, 30 May 2022 11:47:45 +0200
"Simone Weiss" <simone.weiss@elektrobit.com> 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ß <simone.weiss@elektrobit.com>
> Signed-off-by: Kai Tomerius <kai.tomerius@elektrobit.com>
This patch causes reproducibility build failures:
https://autobuilder.yoctoproject.org/typhoon/#/builders/117/builds/936/steps/12/logs/stdio
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH] json-c: Add ptest for json-c
2022-05-30 20:41 ` Luca Ceresoli
@ 2022-05-31 5:44 ` Weiß, Simone
0 siblings, 0 replies; 6+ messages in thread
From: Weiß, Simone @ 2022-05-31 5:44 UTC (permalink / raw)
To: luca.ceresoli; +Cc: openembedded-core, Tomerius, Kai
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" <simone.weiss@elektrobit.com> 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ß <simone.weiss@elektrobit.com>
> > Signed-off-by: Kai Tomerius <kai.tomerius@elektrobit.com>
>
> 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%2Fstdio&data=05%7C01%7C%7Ce317d8b365b4486fbbce08da427cbf7b%7Ce764c36b012e4216910d8fd16283182d%7C0%7C0%7C637895400815424306%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=c7T%2Fi5NMND8iBU31BAjOZfYdIgyqU46yPtilQC7Z%2FFw%3D&reserved=0
>
> --
> Luca Ceresoli, Bootlin
> Embedded Linux and Kernel engineering
>
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbootlin.com%2F&data=05%7C01%7C%7Ce317d8b365b4486fbbce08da427cbf7b%7Ce764c36b012e4216910d8fd16283182d%7C0%7C0%7C637895400815424306%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=uvfd7vyS9Y33UtAWHPRN%2B7xLOQx4%2BwmBrMo9H7CIevw%3D&reserved=0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH] json-c: Add ptest for json-c
2022-05-30 9:36 Simone Weiss
2022-05-30 9:38 ` [OE-core] " richard.purdie
@ 2022-05-31 15:50 ` Khem Raj
1 sibling, 0 replies; 6+ messages in thread
From: Khem Raj @ 2022-05-31 15:50 UTC (permalink / raw)
To: Simone Weiss
Cc: Patches and discussions about the oe-core layer, Kai Tomerius
On Mon, May 30, 2022 at 2:36 AM Simone Weiss
<simone.weiss@elektrobit.com> wrote:
>
> Also add a script for executing the ptests. All tests were sucessful on a trial
> run.
>
> Signed-off-by: Simone Weiß <simone.weiss@elektrobit.com>
> Signed-off-by: Kai Tomerius <kai.tomerius@elektrobit.com>
> ---
> 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<pver>\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
> +}
cp -r may have permission issues its better to install using install utility
>
> 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/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH] json-c: Add ptest for json-c
2022-05-30 9:36 Simone Weiss
@ 2022-05-30 9:38 ` richard.purdie
2022-05-31 15:50 ` Khem Raj
1 sibling, 0 replies; 6+ messages in thread
From: richard.purdie @ 2022-05-30 9:38 UTC (permalink / raw)
To: Simone Weiss, openembedded-core; +Cc: Kai Tomerius
On Mon, 2022-05-30 at 11:36 +0200, Simone Weiss wrote:
> Also add a script for executing the ptests. All tests were sucessful on a trial
> run.
>
> Signed-off-by: Simone Weiß <simone.weiss@elektrobit.com>
> Signed-off-by: Kai Tomerius <kai.tomerius@elektrobit.com>
> ---
> 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<pver>\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"
I like the idea, thanks for the patch. I think it is missing the run-
ptest file?
Cheers,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-05-31 15:51 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-30 9:47 [PATCH] json-c: Add ptest for json-c Simone Weiss
2022-05-30 10:30 ` [OE-core] " Alexander Kanavin
2022-05-30 20:41 ` Luca Ceresoli
2022-05-31 5:44 ` Weiß, Simone
-- strict thread matches above, loose matches on Subject: below --
2022-05-30 9:36 Simone Weiss
2022-05-30 9:38 ` [OE-core] " richard.purdie
2022-05-31 15:50 ` Khem Raj
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.