summaryrefslogtreecommitdiffstats
path: root/meta-agl-test/recipes-support/lz4
diff options
context:
space:
mode:
authorQiu Tingting <qiutt@fujitsu.com>2023-05-05 15:23:55 +0800
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2023-05-08 16:16:08 +0000
commita070ad4db8e4a35fc34b0610b56dcfc1e2caaad3 (patch)
tree749f6bb4f72460ef91ae5843e20f3b241d16b074 /meta-agl-test/recipes-support/lz4
parentd82fb7b402d1b3346fc99aca591bb647110133fc (diff)
lz4: Add ptest support
Add a ptest for lz4. It is a backport for http://cgit.openembedded.org/openembedded-core/commit/?id=2ee144a0bfb88823bfa788697bb7afc9a572c413 It should be deleted after yocto version up. SPEC-4753 Signed-off-by: Qiu Tingting <qiutt@fujitsu.com> Change-Id: Ibca25bbafc7857d30a1c487ac130fb22774cad97
Diffstat (limited to 'meta-agl-test/recipes-support/lz4')
-rw-r--r--meta-agl-test/recipes-support/lz4/files/run-ptest17
-rw-r--r--meta-agl-test/recipes-support/lz4/lz4_%.bbappend26
2 files changed, 43 insertions, 0 deletions
diff --git a/meta-agl-test/recipes-support/lz4/files/run-ptest b/meta-agl-test/recipes-support/lz4/files/run-ptest
new file mode 100644
index 00000000..c662c60e
--- /dev/null
+++ b/meta-agl-test/recipes-support/lz4/files/run-ptest
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# Define test work dir
+WORKDIR=@PTEST_PATH@/tests/
+
+# Run test
+cd ${WORKDIR}
+
+case_name="test_frame"
+./frametest
+ret=$?
+if [[ ${ret} == "0" ]]; then
+ echo "PASS: lz4/$case_name"
+else
+ echo "FAIL: lz4/$case_name"
+fi
+
diff --git a/meta-agl-test/recipes-support/lz4/lz4_%.bbappend b/meta-agl-test/recipes-support/lz4/lz4_%.bbappend
new file mode 100644
index 00000000..eff14bb3
--- /dev/null
+++ b/meta-agl-test/recipes-support/lz4/lz4_%.bbappend
@@ -0,0 +1,26 @@
+# Add ptest support
+# backport of yocto
+# http://cgit.openembedded.org/openembedded-core/commit/?id=2ee144a0bfb88823bfa788697bb7afc9a572c413
+#
+FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
+
+SRC_URI += " \
+ file://run-ptest \
+"
+
+inherit ptest
+
+RDEPENDS:${PN}-ptest += "bash"
+
+do_compile_ptest() {
+ oe_runmake -C ${B}/tests/
+}
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/tests/
+ install --mode=755 ${B}/tests/frametest ${D}${PTEST_PATH}/tests/
+ sed -i "s#@PTEST_PATH@#${PTEST_PATH}#g" ${D}${PTEST_PATH}/run-ptest
+
+}
+
+