diff mbox series

[meta-python] python3-rapidjson: add ptest

Message ID 20231010160932.1711687-1-yoann.congal@smile.fr
State Under Review
Headers show
Series [meta-python] python3-rapidjson: add ptest | expand

Commit Message

Yoann Congal Oct. 10, 2023, 4:09 p.m. UTC
From: Mickael RAMILISON <mickael.ramilison@smile.fr>

Signed-off-by: Mickael RAMILISON <mickael.ramilison@smile.fr>
Reviewed-by: Yoann Congal <yoann.congal@smile.fr>
---
Note:
As of now, the ptest shows:
  Testsuite summary
  # TOTAL: 940
  # PASS: 913
  # SKIP: 17
  # XFAIL: 2
  # FAIL: 8
  # XPASS: 0
  # ERROR: 0

 .../python/python3-rapidjson/run-ptest        |  3 +++
 .../python/python3-rapidjson_1.11.bb          | 20 ++++++++++++++++++-
 2 files changed, 22 insertions(+), 1 deletion(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-rapidjson/run-ptest

Comments

Khem Raj Oct. 10, 2023, 4:14 p.m. UTC | #1
Thanks for this patch, I am wondering what those 8 fails are and if we
can perhaps fix them or add them to known failure list. Then add it to
PTESTS_SLOW_META_PYTHON or PTESTS_FAST_META_PYTHON depending upon how
quick it takes to complete. So we can track regressions
regularly.

On Tue, Oct 10, 2023 at 9:10 AM Yoann Congal <yoann.congal@smile.fr> wrote:
>
> From: Mickael RAMILISON <mickael.ramilison@smile.fr>
>
> Signed-off-by: Mickael RAMILISON <mickael.ramilison@smile.fr>
> Reviewed-by: Yoann Congal <yoann.congal@smile.fr>
> ---
> Note:
> As of now, the ptest shows:
>   Testsuite summary
>   # TOTAL: 940
>   # PASS: 913
>   # SKIP: 17
>   # XFAIL: 2
>   # FAIL: 8
>   # XPASS: 0
>   # ERROR: 0
>
>  .../python/python3-rapidjson/run-ptest        |  3 +++
>  .../python/python3-rapidjson_1.11.bb          | 20 ++++++++++++++++++-
>  2 files changed, 22 insertions(+), 1 deletion(-)
>  create mode 100644 meta-python/recipes-devtools/python/python3-rapidjson/run-ptest
>
> diff --git a/meta-python/recipes-devtools/python/python3-rapidjson/run-ptest b/meta-python/recipes-devtools/python/python3-rapidjson/run-ptest
> new file mode 100644
> index 000000000..8d2017d39
> --- /dev/null
> +++ b/meta-python/recipes-devtools/python/python3-rapidjson/run-ptest
> @@ -0,0 +1,3 @@
> +#!/bin/sh
> +
> +pytest --automake
> diff --git a/meta-python/recipes-devtools/python/python3-rapidjson_1.11.bb b/meta-python/recipes-devtools/python/python3-rapidjson_1.11.bb
> index 930ad3434..3ea559488 100644
> --- a/meta-python/recipes-devtools/python/python3-rapidjson_1.11.bb
> +++ b/meta-python/recipes-devtools/python/python3-rapidjson_1.11.bb
> @@ -9,14 +9,32 @@ SRCREV = "e1b41f64df1705770b7b70d7221a4812909c1d0f"
>
>  S = "${WORKDIR}/git"
>
> -inherit setuptools3
> +# Inheriting ptest provides functionality for packaging and installing runtime tests for this recipe
> +inherit setuptools3 ptest
>
>  SETUPTOOLS_BUILD_ARGS += " --rj-include-dir=${RECIPE_SYSROOT}${includedir}"
>
> +# run-ptest is a shell script that starts the test suite
> +SRC_URI += " \
> +    file://run-ptest \
> +"
> +
>  DEPENDS += " \
>      rapidjson \
>  "
>
> +# Adding required python package for the ptest (pytest and pytest->automake report translation)
> +RDEPENDS:${PN}-ptest += " \
> +    ${PYTHON_PN}-pytest \
> +    ${PYTHON_PN}-unittest-automake-output \
> +"
> +
>  RDEPENDS:${PN} += " \
>      ${PYTHON_PN}-core \
>  "
> +
> +# Installing the test suite on the target
> +do_install_ptest() {
> +    install -d ${D}${PTEST_PATH}/tests
> +    cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
> +}
> --
> 2.30.2
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#105409): https://lists.openembedded.org/g/openembedded-devel/message/105409
> Mute This Topic: https://lists.openembedded.org/mt/101878478/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Yoann Congal Oct. 10, 2023, 4:18 p.m. UTC | #2
Le mar. 10 oct. 2023 à 18:14, Khem Raj <raj.khem@gmail.com> a écrit :
> Thanks for this patch, I am wondering what those 8 fails are and if we
> can perhaps fix them or add them to known failure list.

We (as a team) may lack the time to really fix the tests but "add them
to known failure list" while taking note of coming back to it will be
feasible. I'll look into this.

> Then add it to
> PTESTS_SLOW_META_PYTHON or PTESTS_FAST_META_PYTHON depending upon how
> quick it takes to complete. So we can track regressions
> regularly.

The test is under 4s (under qemu x86-64 kvm), This would be FAST I guess.

Thanks!


>
> On Tue, Oct 10, 2023 at 9:10 AM Yoann Congal <yoann.congal@smile.fr> wrote:
> >
> > From: Mickael RAMILISON <mickael.ramilison@smile.fr>
> >
> > Signed-off-by: Mickael RAMILISON <mickael.ramilison@smile.fr>
> > Reviewed-by: Yoann Congal <yoann.congal@smile.fr>
> > ---
> > Note:
> > As of now, the ptest shows:
> >   Testsuite summary
> >   # TOTAL: 940
> >   # PASS: 913
> >   # SKIP: 17
> >   # XFAIL: 2
> >   # FAIL: 8
> >   # XPASS: 0
> >   # ERROR: 0
> >
> >  .../python/python3-rapidjson/run-ptest        |  3 +++
> >  .../python/python3-rapidjson_1.11.bb          | 20 ++++++++++++++++++-
> >  2 files changed, 22 insertions(+), 1 deletion(-)
> >  create mode 100644 meta-python/recipes-devtools/python/python3-rapidjson/run-ptest
> >
> > diff --git a/meta-python/recipes-devtools/python/python3-rapidjson/run-ptest b/meta-python/recipes-devtools/python/python3-rapidjson/run-ptest
> > new file mode 100644
> > index 000000000..8d2017d39
> > --- /dev/null
> > +++ b/meta-python/recipes-devtools/python/python3-rapidjson/run-ptest
> > @@ -0,0 +1,3 @@
> > +#!/bin/sh
> > +
> > +pytest --automake
> > diff --git a/meta-python/recipes-devtools/python/python3-rapidjson_1.11.bb b/meta-python/recipes-devtools/python/python3-rapidjson_1.11.bb
> > index 930ad3434..3ea559488 100644
> > --- a/meta-python/recipes-devtools/python/python3-rapidjson_1.11.bb
> > +++ b/meta-python/recipes-devtools/python/python3-rapidjson_1.11.bb
> > @@ -9,14 +9,32 @@ SRCREV = "e1b41f64df1705770b7b70d7221a4812909c1d0f"
> >
> >  S = "${WORKDIR}/git"
> >
> > -inherit setuptools3
> > +# Inheriting ptest provides functionality for packaging and installing runtime tests for this recipe
> > +inherit setuptools3 ptest
> >
> >  SETUPTOOLS_BUILD_ARGS += " --rj-include-dir=${RECIPE_SYSROOT}${includedir}"
> >
> > +# run-ptest is a shell script that starts the test suite
> > +SRC_URI += " \
> > +    file://run-ptest \
> > +"
> > +
> >  DEPENDS += " \
> >      rapidjson \
> >  "
> >
> > +# Adding required python package for the ptest (pytest and pytest->automake report translation)
> > +RDEPENDS:${PN}-ptest += " \
> > +    ${PYTHON_PN}-pytest \
> > +    ${PYTHON_PN}-unittest-automake-output \
> > +"
> > +
> >  RDEPENDS:${PN} += " \
> >      ${PYTHON_PN}-core \
> >  "
> > +
> > +# Installing the test suite on the target
> > +do_install_ptest() {
> > +    install -d ${D}${PTEST_PATH}/tests
> > +    cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
> > +}
> > --
> > 2.30.2
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#105409): https://lists.openembedded.org/g/openembedded-devel/message/105409
> > Mute This Topic: https://lists.openembedded.org/mt/101878478/1997914
> > Group Owner: openembedded-devel+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
diff mbox series

Patch

diff --git a/meta-python/recipes-devtools/python/python3-rapidjson/run-ptest b/meta-python/recipes-devtools/python/python3-rapidjson/run-ptest
new file mode 100644
index 000000000..8d2017d39
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-rapidjson/run-ptest
@@ -0,0 +1,3 @@ 
+#!/bin/sh
+
+pytest --automake
diff --git a/meta-python/recipes-devtools/python/python3-rapidjson_1.11.bb b/meta-python/recipes-devtools/python/python3-rapidjson_1.11.bb
index 930ad3434..3ea559488 100644
--- a/meta-python/recipes-devtools/python/python3-rapidjson_1.11.bb
+++ b/meta-python/recipes-devtools/python/python3-rapidjson_1.11.bb
@@ -9,14 +9,32 @@  SRCREV = "e1b41f64df1705770b7b70d7221a4812909c1d0f"
 
 S = "${WORKDIR}/git"
 
-inherit setuptools3
+# Inheriting ptest provides functionality for packaging and installing runtime tests for this recipe
+inherit setuptools3 ptest
 
 SETUPTOOLS_BUILD_ARGS += " --rj-include-dir=${RECIPE_SYSROOT}${includedir}"
 
+# run-ptest is a shell script that starts the test suite
+SRC_URI += " \
+    file://run-ptest \
+"
+
 DEPENDS += " \
     rapidjson \
 "
 
+# Adding required python package for the ptest (pytest and pytest->automake report translation)
+RDEPENDS:${PN}-ptest += " \
+    ${PYTHON_PN}-pytest \
+    ${PYTHON_PN}-unittest-automake-output \
+"
+
 RDEPENDS:${PN} += " \
     ${PYTHON_PN}-core \
 "
+
+# Installing the test suite on the target
+do_install_ptest() {
+    install -d ${D}${PTEST_PATH}/tests
+    cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+}