diff options
author | Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com> | 2015-04-17 16:52:24 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-04-19 13:34:05 +0100 |
commit | 313a6ee224831d842af8ca95d827bf17230540dc (patch) | |
tree | 335e8fd1d305b1dddc521aef457247338bd20b0e /meta/recipes-extended/mdadm | |
parent | 9d86eb2e448263f7e395b48d95c380b2dc66ad8e (diff) | |
download | openembedded-core-313a6ee224831d842af8ca95d827bf17230540dc.tar.gz openembedded-core-313a6ee224831d842af8ca95d827bf17230540dc.tar.bz2 openembedded-core-313a6ee224831d842af8ca95d827bf17230540dc.zip |
mdadm: add ptest
Enable ptest for mdadm, by reusing internal testsuite.
Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/mdadm')
-rw-r--r-- | meta/recipes-extended/mdadm/files/run-ptest | 10 | ||||
-rw-r--r-- | meta/recipes-extended/mdadm/mdadm_3.3.2.bb | 29 |
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 @@ +#!/bin/sh + +./test &>./test.log +if [ $? -eq 0 ] +then + echo "PASS: mdadm" + rm test.log +else + echo "FAIL: mdadm" +fi 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 \ file://mdadm-3.2.2_fix_for_x32.patch \ file://gcc-4.9.patch \ file://mdadm-3.3.2_x32_abi_time_t.patch \ + file://run-ptest \ " SRC_URI[md5sum] = "44698d351501cac6a89072dc877eb220" @@ -45,3 +46,31 @@ do_install() { } FILES_${PN} += "${base_libdir}/udev/rules.d/*.rules" + +inherit ptest + +do_compile_ptest() { + oe_runmake test +} + +do_install_ptest() { + cp -a ${S}/tests ${D}${PTEST_PATH}/tests + cp ${S}/test ${D}${PTEST_PATH} + sed -e 's!sleep 0.*!sleep 1!g; s!/var/tmp!/!g' -i ${D}${PTEST_PATH}/test + ln -s /sbin/mdadm ${D}${PTEST_PATH}/mdadm + for prg in test_stripe swap_super raid6check + do + install -D -m 755 $prg ${D}${PTEST_PATH}/ + done +} +RDEPENDS_${PN}-ptest += "bash" +RRECOMMENDS_${PN}-ptest += " \ + coreutils \ + util-linux \ + kernel-module-loop \ + kernel-module-linear \ + kernel-module-raid0 \ + kernel-module-raid1 \ + kernel-module-raid10 \ + kernel-module-raid456 \ +" |