summaryrefslogtreecommitdiffstats
path: root/meta-agl-test/recipes-external
diff options
context:
space:
mode:
authorQiu Tingting <qiutt@fujitsu.com>2023-09-01 13:55:19 +0800
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2023-09-05 15:04:19 +0000
commita82108229cd513d287d34544ecf3e3e4806f99a3 (patch)
treed34b7cf081a61e39264aea6a68686ed2af339d4c /meta-agl-test/recipes-external
parent452232c0acd8753bc70aa0af04171f606e132be0 (diff)
xz: Add ptest support
Add ptest support for xz. It is a backport for https://lists.openembedded.org/g/openembedded-core/message/182481 It should be deleted after yocto version up. SPEC-4753 Signed-off-by: Qiu Tingting <qiutt@fujitsu.com> Change-Id: I3dd4f7f70d1f71cb277506af2cd2e3d28d596150
Diffstat (limited to 'meta-agl-test/recipes-external')
-rw-r--r--meta-agl-test/recipes-external/xz/files/run-ptest13
-rw-r--r--meta-agl-test/recipes-external/xz/xz_5.2.6.bbappend25
2 files changed, 38 insertions, 0 deletions
diff --git a/meta-agl-test/recipes-external/xz/files/run-ptest b/meta-agl-test/recipes-external/xz/files/run-ptest
new file mode 100644
index 00000000..3338c516
--- /dev/null
+++ b/meta-agl-test/recipes-external/xz/files/run-ptest
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+cd ./tests
+for i in `ls test*`; do
+ ./$i
+ result=$?
+ if [[ $result == "0" ]]
+ then
+ echo "PASS: $i"
+ else
+ echo "FAIL: $i"
+ fi
+done
diff --git a/meta-agl-test/recipes-external/xz/xz_5.2.6.bbappend b/meta-agl-test/recipes-external/xz/xz_5.2.6.bbappend
new file mode 100644
index 00000000..4581d4c6
--- /dev/null
+++ b/meta-agl-test/recipes-external/xz/xz_5.2.6.bbappend
@@ -0,0 +1,25 @@
+# Add ptest support
+# backport of yocto
+#
+FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
+
+SRC_URI += " \
+ file://run-ptest \
+"
+
+inherit ptest
+
+do_compile_ptest(){
+ oe_runmake -C ${B}/tests/ check TESTS=
+}
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/tests/
+ install --mode=755 ${B}/tests/.libs/* ${D}${PTEST_PATH}/tests/
+
+ install -d ${D}${PTEST_PATH}/tests/files/
+ install --mode=755 ${S}/tests/files/* ${D}${PTEST_PATH}/tests/files/
+}
+
+RDEPENDS:${PN}-ptest += "bash"
+