Thanks for adding to ptests, it's quite an important part of the project Its not clear if the test was run on recipe specific ptest image or part of some larger general purpose image.
e.g. for MACHINE=qemux86-64 bitbake meta-oe-image-ptest-pegtl would build it and bitbake meta-oe-image-ptest-pegtl -ctestimage would run it. This is to ensure that recipe includes all the needed rdeps for ptests to run On Thu, Aug 29, 2024 at 9:21 AM Alexandre Truong via lists.openembedded.org <[email protected]> wrote: > > From: Alexandre Truong <[email protected]> > > Test added to the fast-list. > > Result of ptest-runner: > > root@qemux86-64:~# ptest-runner pegtl > START: ptest-runner > 2024-08-29T13:57 > BEGIN: /usr/lib/pegtl/ptest > PASS: src/test/pegtl/pegtl-test-action_enable > PASS: src/test/pegtl/pegtl-test-action_match > PASS: src/test/pegtl/pegtl-test-actions_one > [...] > PASS: src/test/pegtl/pegtl-test-utf8_general > PASS: src/test/pegtl/pegtl-test-visit > PASS: All 128 tests passed > DURATION: 4 > END: /usr/lib/pegtl/ptest > 2024-08-29T13:57 > STOP: ptest-runner > TOTAL: 1 FAIL: 0 > > NB: two tests are being skipped with a exception raised as support is disabled > > Exception support disabled, skipping test... > PASS: src/test/pegtl/pegtl-test-internal_file_mapper > Exception support disabled, skipping test... > PASS: src/test/pegtl/pegtl-test-internal_file_opener > > Signed-off-by: Alexandre Truong <[email protected]> > Reviewed-by: Yoann Congal <[email protected]> > --- > .../include/ptest-packagelists-meta-oe.inc | 1 + > .../recipes-extended/pegtl/pegtl/run-ptest | 23 +++++++++++++++++++ > meta-oe/recipes-extended/pegtl/pegtl_3.2.7.bb | 15 ++++++++++-- > 3 files changed, 37 insertions(+), 2 deletions(-) > create mode 100644 meta-oe/recipes-extended/pegtl/pegtl/run-ptest > > diff --git a/meta-oe/conf/include/ptest-packagelists-meta-oe.inc > b/meta-oe/conf/include/ptest-packagelists-meta-oe.inc > index 01bf975a15..0ea43f5972 100644 > --- a/meta-oe/conf/include/ptest-packagelists-meta-oe.inc > +++ b/meta-oe/conf/include/ptest-packagelists-meta-oe.inc > @@ -33,6 +33,7 @@ PTESTS_FAST_META_OE = "\ > nodejs \ > onig \ > oprofile \ > + pegtl \ > protobuf \ > pv \ > python3-pefile \ > diff --git a/meta-oe/recipes-extended/pegtl/pegtl/run-ptest > b/meta-oe/recipes-extended/pegtl/pegtl/run-ptest > new file mode 100644 > index 0000000000..e819628c9f > --- /dev/null > +++ b/meta-oe/recipes-extended/pegtl/pegtl/run-ptest > @@ -0,0 +1,23 @@ > +#!/bin/sh > + > +fail_count=0 > +all_count=0 > + > +for test_suite in src/test/pegtl/pegtl-test-* > +do > + if "./$test_suite" > + then > + echo "PASS: $test_suite" > + else > + echo "FAIL: $test_suite" > + fail_count=$((fail_count + 1)) > + fi > + all_count=$((all_count + 1)) > +done > + > +if [ $fail_count -eq 0 ] > +then > + echo "PASS: All $all_count tests passed" > +else > + echo "FAIL: $fail_count of $all_count tests failed" > +fi > diff --git a/meta-oe/recipes-extended/pegtl/pegtl_3.2.7.bb > b/meta-oe/recipes-extended/pegtl/pegtl_3.2.7.bb > index 237828dbfc..2e32e3e788 100644 > --- a/meta-oe/recipes-extended/pegtl/pegtl_3.2.7.bb > +++ b/meta-oe/recipes-extended/pegtl/pegtl_3.2.7.bb > @@ -3,11 +3,22 @@ HOMEPAGE="https://github.com/taocpp/PEGTL" > LICENSE="MIT" > LIC_FILES_CHKSUM = "file://LICENSE;md5=dccf35ef30bf912bb07b01d469965293" > > -SRC_URI = "git://github.com/taocpp/PEGTL.git;protocol=https;branch=3.x" > +SRC_URI = " \ > + git://github.com/taocpp/PEGTL.git;protocol=https;branch=3.x \ > + file://run-ptest \ > +" > + > SRCREV = "cf639f7f4ee125f68e1ccfba8d99ebc0de57b9fe" > > -inherit cmake > +inherit cmake ptest > > S = "${WORKDIR}/git" > > +do_install_ptest () { > + install -d ${D}${PTEST_PATH}/src/test/pegtl/data > + install -m 0755 ${B}/src/test/pegtl/pegtl-test-* > ${D}${PTEST_PATH}/src/test/pegtl > + install ${S}/src/test/pegtl/file_*.txt ${D}${PTEST_PATH}/src/test/pegtl > + install ${S}/src/test/pegtl/data/*.json > ${D}${PTEST_PATH}/src/test/pegtl/data > +} > + > CXXFLAGS += " -Wno-error=type-limits" > > >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#112036): https://lists.openembedded.org/g/openembedded-devel/message/112036 Mute This Topic: https://lists.openembedded.org/mt/108164523/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
