Message ID | 20230917182829.2153680-1-f_l_k@t-online.de |
---|---|
State | Accepted, archived |
Commit | 334410b10652881bb34dc06f5c68d500c9339b65 |
Headers | show |
Series | [1/4] libxmlb: import recipe from meta-oe | expand |
On Sun, 2023-09-17 at 20:28 +0200, Markus Volk wrote: > appstream has a dependency on it > > - add a patch to fix a reproducibility and runtime issue with ptest > ptest completes without error > > Signed-off-by: Markus Volk <f_l_k@t-online.de> > --- > ...xb-selftest.c-hardcode-G_TEST_SRCDIR.patch | 35 +++++++++++++++++++ > meta/recipes-gnome/libxmlb/libxmlb/run-ptest | 3 ++ > meta/recipes-gnome/libxmlb/libxmlb_0.3.14.bb | 25 +++++++++++++ > 3 files changed, 63 insertions(+) > create mode 100644 meta/recipes-gnome/libxmlb/libxmlb/0001-xb-selftest.c-hardcode-G_TEST_SRCDIR.patch > create mode 100644 meta/recipes-gnome/libxmlb/libxmlb/run-ptest > create mode 100644 meta/recipes-gnome/libxmlb/libxmlb_0.3.14.bb > > diff --git a/meta/recipes-gnome/libxmlb/libxmlb/0001-xb-selftest.c-hardcode-G_TEST_SRCDIR.patch b/meta/recipes-gnome/libxmlb/libxmlb/0001-xb-selftest.c-hardcode-G_TEST_SRCDIR.patch > new file mode 100644 > index 0000000000..da8ce68df9 > --- /dev/null > +++ b/meta/recipes-gnome/libxmlb/libxmlb/0001-xb-selftest.c-hardcode-G_TEST_SRCDIR.patch > @@ -0,0 +1,35 @@ > +From dc208bafc57c1ccaa0ca260f99c8b4c976271ebc Mon Sep 17 00:00:00 2001 > +From: Markus Volk <f_l_k@t-online.de> > +Date: Sat, 16 Sep 2023 14:02:57 +0200 > +Subject: [PATCH] xb-self-test.c: hardcode G_TEST_SRCDIR > + > +This avoids: > + libxmlb-0.3.14-r0 do_package_qa: QA Issue: File > + /usr/libexec/installed-tests/libxmlb/xb-self-test in package libxmlb-ptest > + contains reference to TMPDIR [buildpaths] > + > +and also fixes the runtime for the ptest. > + > +Upstream-Status: Inappropriate [oe-specific] > + > +Signed-off-by: Markus Volk <f_l_k@t-online.de> > +--- > + src/xb-self-test.c | 2 +- > + 1 file changed, 1 insertion(+), 1 deletion(-) > + > +diff --git a/src/xb-self-test.c b/src/xb-self-test.c > +index 47d9728..8b3dd0e 100644 > +--- a/src/xb-self-test.c > ++++ b/src/xb-self-test.c > +@@ -2870,7 +2870,7 @@ xb_speed_func(void) > + int > + main(int argc, char **argv) > + { > +- g_setenv("G_TEST_SRCDIR", SRCDIR, FALSE); > ++ g_setenv("G_TEST_SRCDIR", "/usr/libexec/installed-tests/libxmlb", FALSE); > + > + g_test_init(&argc, &argv, NULL); > + > +-- > +2.41.0 > + > diff --git a/meta/recipes-gnome/libxmlb/libxmlb/run-ptest b/meta/recipes-gnome/libxmlb/libxmlb/run-ptest > new file mode 100644 > index 0000000000..6d0bb95d3a > --- /dev/null > +++ b/meta/recipes-gnome/libxmlb/libxmlb/run-ptest > @@ -0,0 +1,3 @@ > +#! /bin/sh > + > +gnome-desktop-testing-runner libxmlb > diff --git a/meta/recipes-gnome/libxmlb/libxmlb_0.3.14.bb b/meta/recipes-gnome/libxmlb/libxmlb_0.3.14.bb > new file mode 100644 > index 0000000000..1d3b0de29a > --- /dev/null > +++ b/meta/recipes-gnome/libxmlb/libxmlb_0.3.14.bb > @@ -0,0 +1,25 @@ > +SUMMARY = "A library to help create and query binary XML blobs" > +HOMEPAGE = "https://github.com/hughsie/libxmlb" > +LICENSE = "LGPL-2.1-only" > +LIC_FILES_CHKSUM = "file://LICENSE;md5=1803fa9c2c3ce8cb06b4861d75310742" > + > +SRC_URI = " \ > + git://github.com/hughsie/libxmlb.git;branch=main;protocol=https \ > + file://0001-xb-selftest.c-hardcode-G_TEST_SRCDIR.patch \ > + file://run-ptest \ > +" > +SRCREV = "aa577b276adc66564f5777f9a522ca3bf0bfa65e" > +S = "${WORKDIR}/git" > + > +DEPENDS = "glib-2.0 xz zstd" > + > +inherit gobject-introspection gtk-doc meson ptest-gnome lib_package pkgconfig > + > +PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" > +PACKAGECONFIG[tests] = "-Dtests=true,-Dtests=false" > + > +GTKDOC_MESON_OPTION = "gtkdoc" > + > +FILES:${PN} += "${datadir}" > + > +BBCLASSEXTEND = "native" https://autobuilder.yoctoproject.org/typhoon/#/builders/45/builds/7823/steps/11/logs/warnings (and I suspect warnings from other targets will follow) Cheers, Richard
On Mon, Sep 18 2023 at 12:24:40 PM +01:00:00, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> (and I suspect warnings from other targets will follow)
yes, I noticed that too. However, I couldn't decide where it had to be
entered and whether at all. That's why I left this question open
You need to first check (with kvm) how long the tests are taking (and that they pass, obviously), then add to one of the lists in ptest-packagelists.inc. Alex On Mon, 18 Sept 2023 at 13:29, Markus Volk <f_l_k@t-online.de> wrote: > > On Mon, Sep 18 2023 at 12:24:40 PM +01:00:00, Richard Purdie <richard.purdie@linuxfoundation.org> wrote: > > (and I suspect warnings from other targets will follow) > > > yes, I noticed that too. However, I couldn't decide where it had to be entered and whether at all. That's why I left this question open > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#187824): https://lists.openembedded.org/g/openembedded-core/message/187824 > Mute This Topic: https://lists.openembedded.org/mt/101419208/1686489 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
On Mon, Sep 18 2023 at 01:33:56 PM +02:00:00, Alexander Kanavin <alex.kanavin@gmail.com> wrote: > You need to first check (with kvm) how long the tests are taking (and > that they pass, obviously), then add to one of the lists in > ptest-packagelists.inc. I did that already to check if the test is working at all. It took a few minutes. Didn't focus on that but I guess its been about 1-2 Minutes. That is a fast one, I guess?
On Mon, Sep 18 2023 at 01:40:25 PM +02:00:00, Markus Volk <f_l_k@t-online.de> wrote: > I did that already to check if the test is working at all. It took a > few minutes. Didn't focus on that but I guess its been about 1-2 > Minutes. > That is a fast one, I guess? Tested this again with core-image-sato and runqemu script Without compiling at the same time, it's also much quicker. total=1; passed=1; skipped=0; failed=0 DURATION: 14 But I don't have a clue as to when a ptest is considered slow
The criteria is written in the file where ptests are separated into fast and slow. Alex On Mon, 18 Sept 2023 at 14:39, Markus Volk <f_l_k@t-online.de> wrote: > > On Mon, Sep 18 2023 at 01:40:25 PM +02:00:00, Markus Volk <f_l_k@t-online.de> wrote: > > I did that already to check if the test is working at all. It took a few minutes. Didn't focus on that but I guess its been about 1-2 Minutes. > That is a fast one, I guess? > > > Tested this again with core-image-sato and runqemu script > Without compiling at the same time, it's also much quicker. > total=1; passed=1; skipped=0; failed=0 > DURATION: 14 > > But I don't have a clue as to when a ptest is considered slow
On Mon, Sep 18 2023 at 02:44:00 PM +02:00:00, Alexander Kanavin <alex.kanavin@gmail.com> wrote: > The criteria is written in the file where ptests are separated into > fast and slow. Well documented. You just have to open your eyes ;) Thanks. I'll send an update
diff --git a/meta/recipes-gnome/libxmlb/libxmlb/0001-xb-selftest.c-hardcode-G_TEST_SRCDIR.patch b/meta/recipes-gnome/libxmlb/libxmlb/0001-xb-selftest.c-hardcode-G_TEST_SRCDIR.patch new file mode 100644 index 0000000000..da8ce68df9 --- /dev/null +++ b/meta/recipes-gnome/libxmlb/libxmlb/0001-xb-selftest.c-hardcode-G_TEST_SRCDIR.patch @@ -0,0 +1,35 @@ +From dc208bafc57c1ccaa0ca260f99c8b4c976271ebc Mon Sep 17 00:00:00 2001 +From: Markus Volk <f_l_k@t-online.de> +Date: Sat, 16 Sep 2023 14:02:57 +0200 +Subject: [PATCH] xb-self-test.c: hardcode G_TEST_SRCDIR + +This avoids: + libxmlb-0.3.14-r0 do_package_qa: QA Issue: File + /usr/libexec/installed-tests/libxmlb/xb-self-test in package libxmlb-ptest + contains reference to TMPDIR [buildpaths] + +and also fixes the runtime for the ptest. + +Upstream-Status: Inappropriate [oe-specific] + +Signed-off-by: Markus Volk <f_l_k@t-online.de> +--- + src/xb-self-test.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/xb-self-test.c b/src/xb-self-test.c +index 47d9728..8b3dd0e 100644 +--- a/src/xb-self-test.c ++++ b/src/xb-self-test.c +@@ -2870,7 +2870,7 @@ xb_speed_func(void) + int + main(int argc, char **argv) + { +- g_setenv("G_TEST_SRCDIR", SRCDIR, FALSE); ++ g_setenv("G_TEST_SRCDIR", "/usr/libexec/installed-tests/libxmlb", FALSE); + + g_test_init(&argc, &argv, NULL); + +-- +2.41.0 + diff --git a/meta/recipes-gnome/libxmlb/libxmlb/run-ptest b/meta/recipes-gnome/libxmlb/libxmlb/run-ptest new file mode 100644 index 0000000000..6d0bb95d3a --- /dev/null +++ b/meta/recipes-gnome/libxmlb/libxmlb/run-ptest @@ -0,0 +1,3 @@ +#! /bin/sh + +gnome-desktop-testing-runner libxmlb diff --git a/meta/recipes-gnome/libxmlb/libxmlb_0.3.14.bb b/meta/recipes-gnome/libxmlb/libxmlb_0.3.14.bb new file mode 100644 index 0000000000..1d3b0de29a --- /dev/null +++ b/meta/recipes-gnome/libxmlb/libxmlb_0.3.14.bb @@ -0,0 +1,25 @@ +SUMMARY = "A library to help create and query binary XML blobs" +HOMEPAGE = "https://github.com/hughsie/libxmlb" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=1803fa9c2c3ce8cb06b4861d75310742" + +SRC_URI = " \ + git://github.com/hughsie/libxmlb.git;branch=main;protocol=https \ + file://0001-xb-selftest.c-hardcode-G_TEST_SRCDIR.patch \ + file://run-ptest \ +" +SRCREV = "aa577b276adc66564f5777f9a522ca3bf0bfa65e" +S = "${WORKDIR}/git" + +DEPENDS = "glib-2.0 xz zstd" + +inherit gobject-introspection gtk-doc meson ptest-gnome lib_package pkgconfig + +PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" +PACKAGECONFIG[tests] = "-Dtests=true,-Dtests=false" + +GTKDOC_MESON_OPTION = "gtkdoc" + +FILES:${PN} += "${datadir}" + +BBCLASSEXTEND = "native"
appstream has a dependency on it - add a patch to fix a reproducibility and runtime issue with ptest ptest completes without error Signed-off-by: Markus Volk <f_l_k@t-online.de> --- ...xb-selftest.c-hardcode-G_TEST_SRCDIR.patch | 35 +++++++++++++++++++ meta/recipes-gnome/libxmlb/libxmlb/run-ptest | 3 ++ meta/recipes-gnome/libxmlb/libxmlb_0.3.14.bb | 25 +++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 meta/recipes-gnome/libxmlb/libxmlb/0001-xb-selftest.c-hardcode-G_TEST_SRCDIR.patch create mode 100644 meta/recipes-gnome/libxmlb/libxmlb/run-ptest create mode 100644 meta/recipes-gnome/libxmlb/libxmlb_0.3.14.bb