summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/pegtl
diff options
context:
space:
mode:
authorAlexandre Truong <alexandre.truong@smile.fr>2024-08-29 18:20:46 +0200
committerKhem Raj <raj.khem@gmail.com>2024-08-29 09:37:50 -0700
commit631c69d8535fb4df9b9a5bbab8e8ab5dd6a81958 (patch)
treec3d91eb3ed63f5f0f04b022ea0f904292df392cc /meta-oe/recipes-extended/pegtl
parent9f818a060516b6d0f0b437f5891affc1ab01a3b4 (diff)
downloadmeta-openembedded-631c69d8535fb4df9b9a5bbab8e8ab5dd6a81958.tar.gz
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>
Diffstat (limited to 'meta-oe/recipes-extended/pegtl')
-rw-r--r--meta-oe/recipes-extended/pegtl/pegtl/run-ptest23
-rw-r--r--meta-oe/recipes-extended/pegtl/pegtl_3.2.7.bb15
2 files changed, 36 insertions, 2 deletions
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 @@
1#!/bin/sh
2
3fail_count=0
4all_count=0
5
6for test_suite in src/test/pegtl/pegtl-test-*
7do
8 if "./$test_suite"
9 then
10 echo "PASS: $test_suite"
11 else
12 echo "FAIL: $test_suite"
13 fail_count=$((fail_count + 1))
14 fi
15 all_count=$((all_count + 1))
16done
17
18if [ $fail_count -eq 0 ]
19then
20 echo "PASS: All $all_count tests passed"
21else
22 echo "FAIL: $fail_count of $all_count tests failed"
23fi
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"
3LICENSE="MIT" 3LICENSE="MIT"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=dccf35ef30bf912bb07b01d469965293" 4LIC_FILES_CHKSUM = "file://LICENSE;md5=dccf35ef30bf912bb07b01d469965293"
5 5
6SRC_URI = "git://github.com/taocpp/PEGTL.git;protocol=https;branch=3.x" 6SRC_URI = " \
7 git://github.com/taocpp/PEGTL.git;protocol=https;branch=3.x \
8 file://run-ptest \
9"
10
7SRCREV = "cf639f7f4ee125f68e1ccfba8d99ebc0de57b9fe" 11SRCREV = "cf639f7f4ee125f68e1ccfba8d99ebc0de57b9fe"
8 12
9inherit cmake 13inherit cmake ptest
10 14
11S = "${WORKDIR}/git" 15S = "${WORKDIR}/git"
12 16
17do_install_ptest () {
18 install -d ${D}${PTEST_PATH}/src/test/pegtl/data
19 install -m 0755 ${B}/src/test/pegtl/pegtl-test-* ${D}${PTEST_PATH}/src/test/pegtl
20 install ${S}/src/test/pegtl/file_*.txt ${D}${PTEST_PATH}/src/test/pegtl
21 install ${S}/src/test/pegtl/data/*.json ${D}${PTEST_PATH}/src/test/pegtl/data
22}
23
13CXXFLAGS += " -Wno-error=type-limits" 24CXXFLAGS += " -Wno-error=type-limits"