summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dmitry_eremin@mentor.com>2015-04-17 16:52:24 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-04-19 13:34:43 +0100
commit01fec9e5cc54f0e5398bcaadeacc577b3dab2344 (patch)
tree5e992ca409e0ce2cbf9cf19c2815c8740b3a9ce3 /meta
parent9a664b91da58871f8ad3fbfac07f7292d357ce54 (diff)
downloadpoky-01fec9e5cc54f0e5398bcaadeacc577b3dab2344.tar.gz
mdadm: add ptest
Enable ptest for mdadm, by reusing internal testsuite. (From OE-Core rev: 313a6ee224831d842af8ca95d827bf17230540dc) Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-extended/mdadm/files/run-ptest10
-rw-r--r--meta/recipes-extended/mdadm/mdadm_3.3.2.bb29
2 files changed, 39 insertions, 0 deletions
diff --git a/meta/recipes-extended/mdadm/files/run-ptest b/meta/recipes-extended/mdadm/files/run-ptest
new file mode 100644
index 0000000000..5b276090f5
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/run-ptest
@@ -0,0 +1,10 @@
1#!/bin/sh
2
3./test &>./test.log
4if [ $? -eq 0 ]
5then
6 echo "PASS: mdadm"
7 rm test.log
8else
9 echo "FAIL: mdadm"
10fi
diff --git a/meta/recipes-extended/mdadm/mdadm_3.3.2.bb b/meta/recipes-extended/mdadm/mdadm_3.3.2.bb
index c6a5635207..0742d73ffd 100644
--- a/meta/recipes-extended/mdadm/mdadm_3.3.2.bb
+++ b/meta/recipes-extended/mdadm/mdadm_3.3.2.bb
@@ -12,6 +12,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
12 file://mdadm-3.2.2_fix_for_x32.patch \ 12 file://mdadm-3.2.2_fix_for_x32.patch \
13 file://gcc-4.9.patch \ 13 file://gcc-4.9.patch \
14 file://mdadm-3.3.2_x32_abi_time_t.patch \ 14 file://mdadm-3.3.2_x32_abi_time_t.patch \
15 file://run-ptest \
15 " 16 "
16 17
17SRC_URI[md5sum] = "44698d351501cac6a89072dc877eb220" 18SRC_URI[md5sum] = "44698d351501cac6a89072dc877eb220"
@@ -45,3 +46,31 @@ do_install() {
45} 46}
46 47
47FILES_${PN} += "${base_libdir}/udev/rules.d/*.rules" 48FILES_${PN} += "${base_libdir}/udev/rules.d/*.rules"
49
50inherit ptest
51
52do_compile_ptest() {
53 oe_runmake test
54}
55
56do_install_ptest() {
57 cp -a ${S}/tests ${D}${PTEST_PATH}/tests
58 cp ${S}/test ${D}${PTEST_PATH}
59 sed -e 's!sleep 0.*!sleep 1!g; s!/var/tmp!/!g' -i ${D}${PTEST_PATH}/test
60 ln -s /sbin/mdadm ${D}${PTEST_PATH}/mdadm
61 for prg in test_stripe swap_super raid6check
62 do
63 install -D -m 755 $prg ${D}${PTEST_PATH}/
64 done
65}
66RDEPENDS_${PN}-ptest += "bash"
67RRECOMMENDS_${PN}-ptest += " \
68 coreutils \
69 util-linux \
70 kernel-module-loop \
71 kernel-module-linear \
72 kernel-module-raid0 \
73 kernel-module-raid1 \
74 kernel-module-raid10 \
75 kernel-module-raid456 \
76"