diff --git a/meta-oe/conf/include/ptest-packagelists-meta-oe.inc b/meta-oe/conf/include/ptest-packagelists-meta-oe.inc index b764d5dd58..528ce16191 100644 --- a/meta-oe/conf/include/ptest-packagelists-meta-oe.inc +++ b/meta-oe/conf/include/ptest-packagelists-meta-oe.inc @@ -80,6 +80,7 @@ PTESTS_SLOW_META_OE = "\ postgresql \ re2 \ rocksdb \ + tbb \ " PTESTS_SLOW_META_OE:append:x86 = " kernel-selftest" PTESTS_SLOW_META_OE:append:x86-64 = " kernel-selftest" diff --git a/meta-oe/recipes-core/images/meta-oe-image-ptest.bb b/meta-oe/recipes-core/images/meta-oe-image-ptest.bb index 6361562de4..c9aa334d39 100644 --- a/meta-oe/recipes-core/images/meta-oe-image-ptest.bb +++ b/meta-oe/recipes-core/images/meta-oe-image-ptest.bb @@ -28,6 +28,7 @@ IMAGE_ROOTFS_EXTRA_SPACE:virtclass-mcextend-poco = "1024288" QB_MEM = "-m 1024" # If a particular ptest needs more memory, it can be customized: #QB_MEM:virtclass-mcextend- = "-m 4096" +QB_MEM:virtclass-mcextend-tbb = "-m 2048" TEST_SUITES = "ping ssh parselogs ptest" diff --git a/meta-oe/recipes-support/tbb/files/run-ptest b/meta-oe/recipes-support/tbb/files/run-ptest new file mode 100755 index 0000000000..da46c68550 --- /dev/null +++ b/meta-oe/recipes-support/tbb/files/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +ctest | sed -u 's/\*\*\*/ /g' | awk '/Test +#/{gsub(/Passed/,"PASS"); gsub(/Failed/,"FAIL"); gsub(/Skipped/,"SKIP"); print $6": "$4; fflush();}' diff --git a/meta-oe/recipes-support/tbb/tbb_2022.3.0.bb b/meta-oe/recipes-support/tbb/tbb_2022.3.0.bb index 440b6e0f46..33741a7ac1 100644 --- a/meta-oe/recipes-support/tbb/tbb_2022.3.0.bb +++ b/meta-oe/recipes-support/tbb/tbb_2022.3.0.bb @@ -15,20 +15,23 @@ PE = "1" BRANCH = "onetbb_2022" SRCREV = "f1862f38f83568d96e814e469ab61f88336cc595" SRC_URI = "git://github.com/oneapi-src/oneTBB.git;protocol=https;branch=${BRANCH} \ + file://run-ptest \ " LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -Wl,--undefined-version', '', d)}" -inherit cmake pkgconfig +inherit cmake pkgconfig ptest # test build fails, error: 'mallinfo mallinfo()' is deprecated EXTRA_OECMAKE += " \ - -DTBB_TEST=OFF \ + -DTBB_TEST=${@bb.utils.contains('PTEST_ENABLED', '1', 'ON', 'OFF', d)} \ -DCMAKE_BUILD_TYPE=Release \ -DTBB_STRICT=OFF \ -DTBB_DISABLE_HWLOC_AUTOMATIC_SEARCH=OFF \ " +RDEPENDS:${PN}-ptest += "cmake" + # Hard-float 'd' ABI can't be used for a target that doesn't support the D instruction set extension (ignoring target-abi) # tmp-glibc/work/riscv64-oe-linux/tbb/1_2021.7.0-r0/recipe-sysroot-native/usr/bin/riscv64-oe-linux/riscv64-oe-linux-ld: /tmp/lto-llvm-264bc2.o: can't link soft-float modules with double-float modules # tmp-glibc/work/riscv64-oe-linux/tbb/1_2021.7.0-r0/recipe-sysroot-native/usr/bin/riscv64-oe-linux/riscv64-oe-linux-ld: failed to merge target specific data of file /tmp/lto-llvm-264bc2.o @@ -60,5 +63,24 @@ do_install:append:class-target() { sed -i "s#${RECIPE_SYSROOT}##g" ${D}${libdir}/cmake/TBB/TBBTargets.cmake } +do_install_ptest() { + install -d ${D}${PTEST_PATH} + install ${B}/test/CTestTestfile.cmake ${D}${PTEST_PATH}/ + sed -i -e s#${S}#${PTEST_PATH}#g \ + -e s#${B}#${PTEST_PATH}#g \ + ${D}${PTEST_PATH}/CTestTestfile.cmake +} + +do_install_ptest:append:toolchain-gcc() { + cp -rf ${B}/gnu* ${D}${PTEST_PATH} + rm -rf ${D}${PTEST_PATH}/gnu*/libtbb* + rm -rf ${D}${PTEST_PATH}/gnu*/*.sh +} + +do_install_ptest:append:toolchain-clang() { + cp -rf ${B}/clang* ${D}${PTEST_PATH} + rm -rf ${D}${PTEST_PATH}/clang*/libtbb* + rm -rf ${D}${PTEST_PATH}/clang*/*.sh +} BBCLASSEXTEND = "native nativesdk"