summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQiu Tingting <qiutt@fujitsu.com>2023-04-06 10:23:30 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-05-02 10:25:40 +0100
commit9ca04fc169d512579238fff4ba337dcc23e42af4 (patch)
tree6f82795afb0df53b65acf87b4b05e81a79ce3a28
parent768c89e306d0486acf8bc76cecef90436f6551b3 (diff)
downloadpoky-9ca04fc169d512579238fff4ba337dcc23e42af4.tar.gz
lz4: Add ptest support
Add a ptest for lz4. - It is taking around 9 min to execute with kvm, so added it to PTEST_SLOW. - It contains one case: test_frame. - Below is the run log: START: ptest-runner 2023-04-06T00:36 BEGIN: /usr/lib/lz4/ptest Starting lz4frame tester (64-bits, 1.9.4) Seed = 7314 Basic tests completed All tests completed PASS: lz4/test_frame DURATION: 573 END: /usr/lib/lz4/ptest 2023-04-06T00:45 STOP: ptest-runner TOTAL: 1 FAIL: 0 (From OE-Core rev: 2ee144a0bfb88823bfa788697bb7afc9a572c413) Signed-off-by: Qiu Tingting <qiutt@fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/conf/distro/include/ptest-packagelists.inc3
-rw-r--r--meta/recipes-support/lz4/files/run-ptest17
-rw-r--r--meta/recipes-support/lz4/lz4_1.9.4.bb20
3 files changed, 37 insertions, 3 deletions
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index 78750a0d98..2f83132aeb 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -106,6 +106,7 @@ PTESTS_SLOW = "\
106 tcl \ 106 tcl \
107 util-linux \ 107 util-linux \
108 valgrind \ 108 valgrind \
109 lz4 \
109" 110"
110 111
111PTESTS_SLOW:remove:riscv64 = "valgrind" 112PTESTS_SLOW:remove:riscv64 = "valgrind"
@@ -115,7 +116,6 @@ PTESTS_SLOW:remove:x86 = "valgrind"
115PTESTS_PROBLEMS:append:x86 = " valgrind" 116PTESTS_PROBLEMS:append:x86 = " valgrind"
116 117
117# ruby \ # Timeout 118# ruby \ # Timeout
118# lz4 \ # Needs a rewrite
119# rt-tests \ # Needs to be checked whether it runs at all 119# rt-tests \ # Needs to be checked whether it runs at all
120# bash \ # Test outcomes are non-deterministic by design 120# bash \ # Test outcomes are non-deterministic by design
121# ifupdown \ # Tested separately in lib/oeqa/selftest/cases/imagefeatures.py 121# ifupdown \ # Tested separately in lib/oeqa/selftest/cases/imagefeatures.py
@@ -128,7 +128,6 @@ PTESTS_PROBLEMS:append:x86 = " valgrind"
128 128
129PTESTS_PROBLEMS = "\ 129PTESTS_PROBLEMS = "\
130 ruby \ 130 ruby \
131 lz4 \
132 rt-tests \ 131 rt-tests \
133 bash \ 132 bash \
134 ifupdown \ 133 ifupdown \
diff --git a/meta/recipes-support/lz4/files/run-ptest b/meta/recipes-support/lz4/files/run-ptest
new file mode 100644
index 0000000000..f4a46a4f2c
--- /dev/null
+++ b/meta/recipes-support/lz4/files/run-ptest
@@ -0,0 +1,17 @@
1#!/bin/sh
2
3# Define test work dir
4WORKDIR=@PTEST_PATH@/tests/
5
6# Run test
7cd ${WORKDIR}
8
9case_name="test_frame"
10./frametest
11ret=$?
12if [[ ${ret} == "0" ]]; then
13 echo "PASS: lz4/$case_name"
14else
15 echo "FAIL: lz4/$case_name"
16fi
17
diff --git a/meta/recipes-support/lz4/lz4_1.9.4.bb b/meta/recipes-support/lz4/lz4_1.9.4.bb
index a2a178bab5..d2a25fd5b0 100644
--- a/meta/recipes-support/lz4/lz4_1.9.4.bb
+++ b/meta/recipes-support/lz4/lz4_1.9.4.bb
@@ -12,11 +12,15 @@ PE = "1"
12 12
13SRCREV = "5ff839680134437dbf4678f3d0c7b371d84f4964" 13SRCREV = "5ff839680134437dbf4678f3d0c7b371d84f4964"
14 14
15SRC_URI = "git://github.com/lz4/lz4.git;branch=release;protocol=https" 15SRC_URI = "git://github.com/lz4/lz4.git;branch=release;protocol=https \
16 file://run-ptest \
17 "
16UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)" 18UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)"
17 19
18S = "${WORKDIR}/git" 20S = "${WORKDIR}/git"
19 21
22inherit ptest
23
20# Fixed in r118, which is larger than the current version. 24# Fixed in r118, which is larger than the current version.
21CVE_CHECK_IGNORE += "CVE-2014-4715" 25CVE_CHECK_IGNORE += "CVE-2014-4715"
22 26
@@ -27,3 +31,17 @@ do_install() {
27} 31}
28 32
29BBCLASSEXTEND = "native nativesdk" 33BBCLASSEXTEND = "native nativesdk"
34
35RDEPENDS:${PN}-ptest += "bash"
36
37do_compile_ptest() {
38 oe_runmake -C ${B}/tests/
39}
40
41do_install_ptest() {
42 install -d ${D}${PTEST_PATH}/tests/
43 install --mode=755 ${B}/tests/frametest ${D}${PTEST_PATH}/tests/
44 sed -i "s#@PTEST_PATH@#${PTEST_PATH}#g" ${D}${PTEST_PATH}/run-ptest
45
46}
47