Message ID | 20231017011718.144753-1-chi.xu@windriver.com |
---|---|
State | Under Review |
Headers | show |
Series | [meta-oe] re2: Add ptest support | expand |
Thanks for adding ptest, I see that it passes all tests but runs for longer. Maybe add it to PTESTS_SLOW_META_OE as well. On Mon, Oct 16, 2023 at 6:17 PM Chi Xu <chi.xu@eng.windriver.com> wrote: > > From: Chi Xu <chi.xu@windriver.com> > > Test results: > root@qemux86-64:~# ptest-runner re2 -t 7200 > START: ptest-runner > 2023-10-16T08:36 > BEGIN: /usr/lib/re2/ptest > PASS: charclass_test > PASS: compile_test > PASS: filtered_re2_test > PASS: mimics_pcre_test > PASS: parse_test > PASS: possible_match_test > PASS: re2_test > PASS: re2_arg_test > PASS: regexp_test > PASS: required_prefix_test > PASS: search_test > PASS: set_test > PASS: simplify_test > PASS: string_generator_test > PASS: dfa_test > PASS: exhaustive1_test > PASS: exhaustive2_test > PASS: exhaustive3_test > PASS: exhaustive_test > PASS: random_test > DURATION: 2085 > END: /usr/lib/re2/ptest > 2023-10-16T09:11 > STOP: ptest-runner > TOTAL: 1 FAIL: 0 > > Signed-off-by: Chi Xu <chi.xu@windriver.com> > --- > meta-oe/recipes-support/re2/re2/run-ptest | 3 +++ > meta-oe/recipes-support/re2/re2_2023.03.01.bb | 16 +++++++++++++--- > 2 files changed, 16 insertions(+), 3 deletions(-) > create mode 100644 meta-oe/recipes-support/re2/re2/run-ptest > > diff --git a/meta-oe/recipes-support/re2/re2/run-ptest b/meta-oe/recipes-support/re2/re2/run-ptest > new file mode 100644 > index 000000000..8bd5fd1ef > --- /dev/null > +++ b/meta-oe/recipes-support/re2/re2/run-ptest > @@ -0,0 +1,3 @@ > +#!/bin/sh > + > +ctest --force-new-ctest-process | sed -u 's/\*\*\*/ /g' | awk '/Test +#/{gsub(/Passed/,"PASS"); gsub(/Failed/,"FAIL"); gsub(/Skipped/,"SKIP"); print $6": "$4; fflush();}' > diff --git a/meta-oe/recipes-support/re2/re2_2023.03.01.bb b/meta-oe/recipes-support/re2/re2_2023.03.01.bb > index 78bf695a4..fe210d510 100644 > --- a/meta-oe/recipes-support/re2/re2_2023.03.01.bb > +++ b/meta-oe/recipes-support/re2/re2_2023.03.01.bb > @@ -6,17 +6,27 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3b5c31eb512bdf3cb11ffd5713963760" > # tag 2023-03-01 > SRCREV = "241e2e430836e80f93d704d1f06cd3e7fe3100f5" > > -SRC_URI = "git://github.com/google/re2.git;branch=main;protocol=https" > +SRC_URI = "git://github.com/google/re2.git;branch=main;protocol=https \ > + ${@bb.utils.contains('PTEST_ENABLED', '1', 'file://run-ptest', '', d)} \ > + " > > S = "${WORKDIR}/git" > > -inherit cmake > +inherit cmake ptest > +RDEPENDS:${PN}-ptest += "cmake sed" > > EXTRA_OECMAKE += " \ > -DBUILD_SHARED_LIBS=ON \ > - -DRE2_BUILD_TESTING=OFF \ > + ${@bb.utils.contains('PTEST_ENABLED', '1', '-DRE2_BUILD_TESTING=ON', '-DRE2_BUILD_TESTING=OFF', d)} \ > " > > +do_install_ptest () { > + cp -r ${B}/*_test ${D}${PTEST_PATH} > + cp -r ${B}/CTestTestfile.cmake ${D}${PTEST_PATH} > + sed -i -e 's#${B}#${PTEST_PATH}#g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake` > + sed -i -e 's#${S}#${PTEST_PATH}#g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake` > +} > + > # ignore .so in /usr/lib64 > FILES:${PN} = "${libdir}" > INSANE_SKIP:${PN} += "dev-so" > -- > 2.25.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#105545): https://lists.openembedded.org/g/openembedded-devel/message/105545 > Mute This Topic: https://lists.openembedded.org/mt/102010115/1997914 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
Get it. Can I understand that if all the test cases pass, we should add pteat to PTESTS_SLOW_META_OE or PTESTS_FAST_META_OE in the patch? Thanks, Chi > -----Original Message----- > From: Khem Raj <raj.khem@gmail.com> > Sent: Tuesday, October 17, 2023 9:52 AM > To: Xu, Chi <Chi.Xu@windriver.com> > Cc: openembedded-devel@lists.openembedded.org > Subject: Re: [oe] [meta-oe][PATCH] re2: Add ptest support > > CAUTION: This email comes from a non Wind River email account! > Do not click links or open attachments unless you recognize the sender and > know the content is safe. > > Thanks for adding ptest, I see that it passes all tests but runs for longer. > Maybe add it to PTESTS_SLOW_META_OE as well. > > On Mon, Oct 16, 2023 at 6:17 PM Chi Xu <chi.xu@eng.windriver.com> wrote: > > > > From: Chi Xu <chi.xu@windriver.com> > > > > Test results: > > root@qemux86-64:~# ptest-runner re2 -t 7200 > > START: ptest-runner > > 2023-10-16T08:36 > > BEGIN: /usr/lib/re2/ptest > > PASS: charclass_test > > PASS: compile_test > > PASS: filtered_re2_test > > PASS: mimics_pcre_test > > PASS: parse_test > > PASS: possible_match_test > > PASS: re2_test > > PASS: re2_arg_test > > PASS: regexp_test > > PASS: required_prefix_test > > PASS: search_test > > PASS: set_test > > PASS: simplify_test > > PASS: string_generator_test > > PASS: dfa_test > > PASS: exhaustive1_test > > PASS: exhaustive2_test > > PASS: exhaustive3_test > > PASS: exhaustive_test > > PASS: random_test > > DURATION: 2085 > > END: /usr/lib/re2/ptest > > 2023-10-16T09:11 > > STOP: ptest-runner > > TOTAL: 1 FAIL: 0 > > > > Signed-off-by: Chi Xu <chi.xu@windriver.com> > > --- > > meta-oe/recipes-support/re2/re2/run-ptest | 3 +++ > > meta-oe/recipes-support/re2/re2_2023.03.01.bb | 16 +++++++++++++--- > > 2 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 > > meta-oe/recipes-support/re2/re2/run-ptest > > > > diff --git a/meta-oe/recipes-support/re2/re2/run-ptest > > b/meta-oe/recipes-support/re2/re2/run-ptest > > new file mode 100644 > > index 000000000..8bd5fd1ef > > --- /dev/null > > +++ b/meta-oe/recipes-support/re2/re2/run-ptest > > @@ -0,0 +1,3 @@ > > +#!/bin/sh > > + > > +ctest --force-new-ctest-process | sed -u 's/\*\*\*/ /g' | awk '/Test > +#/{gsub(/Passed/,"PASS"); gsub(/Failed/,"FAIL"); gsub(/Skipped/,"SKIP"); > print $6": "$4; fflush();}' > > diff --git a/meta-oe/recipes-support/re2/re2_2023.03.01.bb > > b/meta-oe/recipes-support/re2/re2_2023.03.01.bb > > index 78bf695a4..fe210d510 100644 > > --- a/meta-oe/recipes-support/re2/re2_2023.03.01.bb > > +++ b/meta-oe/recipes-support/re2/re2_2023.03.01.bb > > @@ -6,17 +6,27 @@ LIC_FILES_CHKSUM = > "file://LICENSE;md5=3b5c31eb512bdf3cb11ffd5713963760" > > # tag 2023-03-01 > > SRCREV = "241e2e430836e80f93d704d1f06cd3e7fe3100f5" > > > > -SRC_URI = "git://github.com/google/re2.git;branch=main;protocol=https" > > +SRC_URI = "git://github.com/google/re2.git;branch=main;protocol=https \ > > + ${@bb.utils.contains('PTEST_ENABLED', '1', 'file://run-ptest', '', d)} \ > > + " > > > > S = "${WORKDIR}/git" > > > > -inherit cmake > > +inherit cmake ptest > > +RDEPENDS:${PN}-ptest += "cmake sed" > > > > EXTRA_OECMAKE += " \ > > -DBUILD_SHARED_LIBS=ON \ > > - -DRE2_BUILD_TESTING=OFF \ > > + ${@bb.utils.contains('PTEST_ENABLED', '1', > > + '-DRE2_BUILD_TESTING=ON', '-DRE2_BUILD_TESTING=OFF', d)} \ > > " > > > > +do_install_ptest () { > > + cp -r ${B}/*_test ${D}${PTEST_PATH} > > + cp -r ${B}/CTestTestfile.cmake ${D}${PTEST_PATH} > > + sed -i -e 's#${B}#${PTEST_PATH}#g' `find ${D}${PTEST_PATH} -name > CTestTestfile.cmake` > > + sed -i -e 's#${S}#${PTEST_PATH}#g' `find ${D}${PTEST_PATH} -name > > +CTestTestfile.cmake` } > > + > > # ignore .so in /usr/lib64 > > FILES:${PN} = "${libdir}" > > INSANE_SKIP:${PN} += "dev-so" > > -- > > 2.25.1 > > > > > > -=-=-=-=-=-=-=-=-=-=-=- > > Links: You receive all messages sent to this group. > > View/Reply Online (#105545): > > https://lists.openembedded.org/g/openembedded-devel/message/105545 > > Mute This Topic: https://lists.openembedded.org/mt/102010115/1997914 > > Group Owner: openembedded-devel+owner@lists.openembedded.org > > Unsubscribe: https://lists.openembedded.org/g/openembedded- > devel/unsub > > [raj.khem@gmail.com] > > -=-=-=-=-=-=-=-=-=-=-=- > >
On Mon, Oct 16, 2023 at 7:00 PM Xu, Chi <Chi.Xu@windriver.com> wrote: > > Get it. > Can I understand that if all the test cases pass, we should add pteat to PTESTS_SLOW_META_OE or PTESTS_FAST_META_OE in the patch? if it can finish running in less than 30s then its considered to be fast family. > > Thanks, > Chi > > > -----Original Message----- > > From: Khem Raj <raj.khem@gmail.com> > > Sent: Tuesday, October 17, 2023 9:52 AM > > To: Xu, Chi <Chi.Xu@windriver.com> > > Cc: openembedded-devel@lists.openembedded.org > > Subject: Re: [oe] [meta-oe][PATCH] re2: Add ptest support > > > > CAUTION: This email comes from a non Wind River email account! > > Do not click links or open attachments unless you recognize the sender and > > know the content is safe. > > > > Thanks for adding ptest, I see that it passes all tests but runs for longer. > > Maybe add it to PTESTS_SLOW_META_OE as well. > > > > On Mon, Oct 16, 2023 at 6:17 PM Chi Xu <chi.xu@eng.windriver.com> wrote: > > > > > > From: Chi Xu <chi.xu@windriver.com> > > > > > > Test results: > > > root@qemux86-64:~# ptest-runner re2 -t 7200 > > > START: ptest-runner > > > 2023-10-16T08:36 > > > BEGIN: /usr/lib/re2/ptest > > > PASS: charclass_test > > > PASS: compile_test > > > PASS: filtered_re2_test > > > PASS: mimics_pcre_test > > > PASS: parse_test > > > PASS: possible_match_test > > > PASS: re2_test > > > PASS: re2_arg_test > > > PASS: regexp_test > > > PASS: required_prefix_test > > > PASS: search_test > > > PASS: set_test > > > PASS: simplify_test > > > PASS: string_generator_test > > > PASS: dfa_test > > > PASS: exhaustive1_test > > > PASS: exhaustive2_test > > > PASS: exhaustive3_test > > > PASS: exhaustive_test > > > PASS: random_test > > > DURATION: 2085 > > > END: /usr/lib/re2/ptest > > > 2023-10-16T09:11 > > > STOP: ptest-runner > > > TOTAL: 1 FAIL: 0 > > > > > > Signed-off-by: Chi Xu <chi.xu@windriver.com> > > > --- > > > meta-oe/recipes-support/re2/re2/run-ptest | 3 +++ > > > meta-oe/recipes-support/re2/re2_2023.03.01.bb | 16 +++++++++++++--- > > > 2 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 > > > meta-oe/recipes-support/re2/re2/run-ptest > > > > > > diff --git a/meta-oe/recipes-support/re2/re2/run-ptest > > > b/meta-oe/recipes-support/re2/re2/run-ptest > > > new file mode 100644 > > > index 000000000..8bd5fd1ef > > > --- /dev/null > > > +++ b/meta-oe/recipes-support/re2/re2/run-ptest > > > @@ -0,0 +1,3 @@ > > > +#!/bin/sh > > > + > > > +ctest --force-new-ctest-process | sed -u 's/\*\*\*/ /g' | awk '/Test > > +#/{gsub(/Passed/,"PASS"); gsub(/Failed/,"FAIL"); gsub(/Skipped/,"SKIP"); > > print $6": "$4; fflush();}' > > > diff --git a/meta-oe/recipes-support/re2/re2_2023.03.01.bb > > > b/meta-oe/recipes-support/re2/re2_2023.03.01.bb > > > index 78bf695a4..fe210d510 100644 > > > --- a/meta-oe/recipes-support/re2/re2_2023.03.01.bb > > > +++ b/meta-oe/recipes-support/re2/re2_2023.03.01.bb > > > @@ -6,17 +6,27 @@ LIC_FILES_CHKSUM = > > "file://LICENSE;md5=3b5c31eb512bdf3cb11ffd5713963760" > > > # tag 2023-03-01 > > > SRCREV = "241e2e430836e80f93d704d1f06cd3e7fe3100f5" > > > > > > -SRC_URI = "git://github.com/google/re2.git;branch=main;protocol=https" > > > +SRC_URI = "git://github.com/google/re2.git;branch=main;protocol=https \ > > > + ${@bb.utils.contains('PTEST_ENABLED', '1', 'file://run-ptest', '', d)} \ > > > + " > > > > > > S = "${WORKDIR}/git" > > > > > > -inherit cmake > > > +inherit cmake ptest > > > +RDEPENDS:${PN}-ptest += "cmake sed" > > > > > > EXTRA_OECMAKE += " \ > > > -DBUILD_SHARED_LIBS=ON \ > > > - -DRE2_BUILD_TESTING=OFF \ > > > + ${@bb.utils.contains('PTEST_ENABLED', '1', > > > + '-DRE2_BUILD_TESTING=ON', '-DRE2_BUILD_TESTING=OFF', d)} \ > > > " > > > > > > +do_install_ptest () { > > > + cp -r ${B}/*_test ${D}${PTEST_PATH} > > > + cp -r ${B}/CTestTestfile.cmake ${D}${PTEST_PATH} > > > + sed -i -e 's#${B}#${PTEST_PATH}#g' `find ${D}${PTEST_PATH} -name > > CTestTestfile.cmake` > > > + sed -i -e 's#${S}#${PTEST_PATH}#g' `find ${D}${PTEST_PATH} -name > > > +CTestTestfile.cmake` } > > > + > > > # ignore .so in /usr/lib64 > > > FILES:${PN} = "${libdir}" > > > INSANE_SKIP:${PN} += "dev-so" > > > -- > > > 2.25.1 > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- > > > Links: You receive all messages sent to this group. > > > View/Reply Online (#105545): > > > https://lists.openembedded.org/g/openembedded-devel/message/105545 > > > Mute This Topic: https://lists.openembedded.org/mt/102010115/1997914 > > > Group Owner: openembedded-devel+owner@lists.openembedded.org > > > Unsubscribe: https://lists.openembedded.org/g/openembedded- > > devel/unsub > > > [raj.khem@gmail.com] > > > -=-=-=-=-=-=-=-=-=-=-=- > > >
diff --git a/meta-oe/recipes-support/re2/re2/run-ptest b/meta-oe/recipes-support/re2/re2/run-ptest new file mode 100644 index 000000000..8bd5fd1ef --- /dev/null +++ b/meta-oe/recipes-support/re2/re2/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +ctest --force-new-ctest-process | sed -u 's/\*\*\*/ /g' | awk '/Test +#/{gsub(/Passed/,"PASS"); gsub(/Failed/,"FAIL"); gsub(/Skipped/,"SKIP"); print $6": "$4; fflush();}' diff --git a/meta-oe/recipes-support/re2/re2_2023.03.01.bb b/meta-oe/recipes-support/re2/re2_2023.03.01.bb index 78bf695a4..fe210d510 100644 --- a/meta-oe/recipes-support/re2/re2_2023.03.01.bb +++ b/meta-oe/recipes-support/re2/re2_2023.03.01.bb @@ -6,17 +6,27 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3b5c31eb512bdf3cb11ffd5713963760" # tag 2023-03-01 SRCREV = "241e2e430836e80f93d704d1f06cd3e7fe3100f5" -SRC_URI = "git://github.com/google/re2.git;branch=main;protocol=https" +SRC_URI = "git://github.com/google/re2.git;branch=main;protocol=https \ + ${@bb.utils.contains('PTEST_ENABLED', '1', 'file://run-ptest', '', d)} \ + " S = "${WORKDIR}/git" -inherit cmake +inherit cmake ptest +RDEPENDS:${PN}-ptest += "cmake sed" EXTRA_OECMAKE += " \ -DBUILD_SHARED_LIBS=ON \ - -DRE2_BUILD_TESTING=OFF \ + ${@bb.utils.contains('PTEST_ENABLED', '1', '-DRE2_BUILD_TESTING=ON', '-DRE2_BUILD_TESTING=OFF', d)} \ " +do_install_ptest () { + cp -r ${B}/*_test ${D}${PTEST_PATH} + cp -r ${B}/CTestTestfile.cmake ${D}${PTEST_PATH} + sed -i -e 's#${B}#${PTEST_PATH}#g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake` + sed -i -e 's#${S}#${PTEST_PATH}#g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake` +} + # ignore .so in /usr/lib64 FILES:${PN} = "${libdir}" INSANE_SKIP:${PN} += "dev-so"