Added unittests, perf tests and examples as ptest. Signed-off-by: Naveen Saini <naveen.kumar.sa...@intel.com> --- recipes-support/isa-l/files/run-ptest | 32 +++++++++++++++++++++++++++ recipes-support/isa-l/isa-l_2.27.0.bb | 32 +++++++++++++++++++++++++-- 2 files changed, 62 insertions(+), 2 deletions(-) create mode 100755 recipes-support/isa-l/files/run-ptest
diff --git a/recipes-support/isa-l/files/run-ptest b/recipes-support/isa-l/files/run-ptest new file mode 100755 index 00000000..22dfffcc --- /dev/null +++ b/recipes-support/isa-l/files/run-ptest @@ -0,0 +1,32 @@ +#!/bin/sh + +cd tests + +failed=0 +all=0 + +echo 'Executing isa-l unittest..' +for f in unittest/*; do + ./$f | grep -i Pass + if [ $? -eq 0 ]; then + echo PASS: $f + all=$((all + 1)) + else + echo FAIL: $f + failed=$((failed + 1)) + all=$((all + 1)) + fi +done + +if [ "$failed" -eq 0 ] ; then + echo "All $all tests passed" +else + echo "$failed of $all tests failed" +fi + +echo 'Executing isa-l performance tests & examples..' +for f in perf/* example/*; do + echo $f: + ./$f +done + diff --git a/recipes-support/isa-l/isa-l_2.27.0.bb b/recipes-support/isa-l/isa-l_2.27.0.bb index ac9cfad8..1d107111 100644 --- a/recipes-support/isa-l/isa-l_2.27.0.bb +++ b/recipes-support/isa-l/isa-l_2.27.0.bb @@ -5,13 +5,41 @@ LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=e6c7d82ad7dd512687b0991a159a1ca9" SECTION = "lib" -inherit autotools pkgconfig +inherit autotools pkgconfig ptest S = "${WORKDIR}/git" SRCREV = "0111c21cbc775bd2b152cd06717f7f09988bc0f1" -SRC_URI = "git://github.com/intel/isa-l.git" +SRC_URI = "git://github.com/intel/isa-l.git \ + file://run-ptest \ +" DEPENDS = "nasm-native" AS[unexport] = "1" COMPATIBLE_HOST = '(x86_64).*-linux' + +do_compile_ptest() { + cd ${B} + oe_runmake tests perfs ex +} + +do_install_ptest () { + install -d ${D}${PTEST_PATH}/tests + install -d ${D}${PTEST_PATH}/tests/unittest + install -m 0755 ${B}/erasure_code/.libs/gf_*_test ${D}${PTEST_PATH}/tests/unittest/ + install -d ${D}${PTEST_PATH}/tests/perf + install -m 0755 ${B}/erasure_code/.libs/erasure_*_perf ${D}${PTEST_PATH}/tests/perf/ + install -m 0755 ${B}/erasure_code/.libs/gf_*_perf ${D}${PTEST_PATH}/tests/perf/ + install -m 0755 ${B}/erasure_code/.libs/gf_vect_dot_prod_1tbl ${D}${PTEST_PATH}/tests/perf/ + install -m 0755 ${B}/crc/.libs/crc*_perf ${D}${PTEST_PATH}/tests/perf/ + install -m 0755 ${B}/igzip/.libs/adler32_perf ${D}${PTEST_PATH}/tests/perf/ + install -m 0755 ${B}/mem/.libs/mem_zero_detect_perf ${D}${PTEST_PATH}/tests/perf/ + install -m 0755 ${B}/raid/.libs/pq_gen_perf ${D}${PTEST_PATH}/tests/perf/ + install -m 0755 ${B}/raid/.libs/xor_gen_perf ${D}${PTEST_PATH}/tests/perf/ + install -d ${D}${PTEST_PATH}/tests/example + install -m 0755 ${B}/crc/.libs/crc64_example ${D}${PTEST_PATH}/tests/example/ + install -m 0755 ${B}/crc/.libs/crc_simple_test ${D}${PTEST_PATH}/tests/example/ + install -m 0755 ${B}/igzip/.libs/igzip*_example ${D}${PTEST_PATH}/tests/example/ + install -m 0755 ${B}/raid/.libs/xor_example ${D}${PTEST_PATH}/tests/example/ +} +RDEPENDS_${PN}-ptest = "bash" -- 2.17.1 -- _______________________________________________ meta-intel mailing list meta-intel@yoctoproject.org https://lists.yoctoproject.org/listinfo/meta-intel