mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-01-04 16:10:10 +00:00
pegtl: add ptest support
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 <alexandre.truong@smile.fr> Reviewed-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
9f818a0605
commit
631c69d853
|
|
@ -33,6 +33,7 @@ PTESTS_FAST_META_OE = "\
|
|||
nodejs \
|
||||
onig \
|
||||
oprofile \
|
||||
pegtl \
|
||||
protobuf \
|
||||
pv \
|
||||
python3-pefile \
|
||||
|
|
|
|||
23
meta-oe/recipes-extended/pegtl/pegtl/run-ptest
Normal file
23
meta-oe/recipes-extended/pegtl/pegtl/run-ptest
Normal file
|
|
@ -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
|
||||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user