diff options
author | Qiu Tingting <qiutt@fujitsu.com> | 2023-04-06 10:23:30 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-05-02 10:25:40 +0100 |
commit | 9ca04fc169d512579238fff4ba337dcc23e42af4 (patch) | |
tree | 6f82795afb0df53b65acf87b4b05e81a79ce3a28 /meta/recipes-support | |
parent | 768c89e306d0486acf8bc76cecef90436f6551b3 (diff) | |
download | poky-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>
Diffstat (limited to 'meta/recipes-support')
-rw-r--r-- | meta/recipes-support/lz4/files/run-ptest | 17 | ||||
-rw-r--r-- | meta/recipes-support/lz4/lz4_1.9.4.bb | 20 |
2 files changed, 36 insertions, 1 deletions
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 | ||
4 | WORKDIR=@PTEST_PATH@/tests/ | ||
5 | |||
6 | # Run test | ||
7 | cd ${WORKDIR} | ||
8 | |||
9 | case_name="test_frame" | ||
10 | ./frametest | ||
11 | ret=$? | ||
12 | if [[ ${ret} == "0" ]]; then | ||
13 | echo "PASS: lz4/$case_name" | ||
14 | else | ||
15 | echo "FAIL: lz4/$case_name" | ||
16 | fi | ||
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 | ||
13 | SRCREV = "5ff839680134437dbf4678f3d0c7b371d84f4964" | 13 | SRCREV = "5ff839680134437dbf4678f3d0c7b371d84f4964" |
14 | 14 | ||
15 | SRC_URI = "git://github.com/lz4/lz4.git;branch=release;protocol=https" | 15 | SRC_URI = "git://github.com/lz4/lz4.git;branch=release;protocol=https \ |
16 | file://run-ptest \ | ||
17 | " | ||
16 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)" | 18 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)" |
17 | 19 | ||
18 | S = "${WORKDIR}/git" | 20 | S = "${WORKDIR}/git" |
19 | 21 | ||
22 | inherit ptest | ||
23 | |||
20 | # Fixed in r118, which is larger than the current version. | 24 | # Fixed in r118, which is larger than the current version. |
21 | CVE_CHECK_IGNORE += "CVE-2014-4715" | 25 | CVE_CHECK_IGNORE += "CVE-2014-4715" |
22 | 26 | ||
@@ -27,3 +31,17 @@ do_install() { | |||
27 | } | 31 | } |
28 | 32 | ||
29 | BBCLASSEXTEND = "native nativesdk" | 33 | BBCLASSEXTEND = "native nativesdk" |
34 | |||
35 | RDEPENDS:${PN}-ptest += "bash" | ||
36 | |||
37 | do_compile_ptest() { | ||
38 | oe_runmake -C ${B}/tests/ | ||
39 | } | ||
40 | |||
41 | do_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 | |||