From 09e448e13853e8bce535967454cf08e62e76c6c0 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Thu, 7 Sep 2023 10:45:25 +0200 Subject: bcc: move to the right dynamic-layer * it depends not only on meta-oe, but on meta-python as well and because meta-python depends on meta-oe, we can enable this when ever meta-python is included * fixes: NOTE: Resolving any missing task queue dependencies ERROR: Nothing RPROVIDES 'python3-pyroute2' (but /OE/build/oe-core/meta-clang/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.28.0.bb RDEPENDS on or otherwise requires it) NOTE: Runtime target 'python3-pyroute2' is unbuildable, removing... Missing or unbuildable dependency chain was: ['python3-pyroute2'] ERROR: Nothing RPROVIDES 'python3-netaddr' (but /OE/build/oe-core/meta-clang/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.28.0.bb RDEPENDS on or otherwise requires it) NOTE: Runtime target 'python3-netaddr' is unbuildable, removing... Missing or unbuildable dependency chain was: ['python3-netaddr'] ERROR: Nothing RPROVIDES 'bcc-dev' (but /OE/build/oe-core/meta-clang/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.28.0.bb RDEPENDS on or otherwise requires it) No eligible RPROVIDERs exist for 'bcc-dev' NOTE: Runtime target 'bcc-dev' is unbuildable, removing... Missing or unbuildable dependency chain was: ['bcc-dev'] ERROR: Nothing RPROVIDES 'bcc' (but /OE/build/oe-core/meta-clang/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.28.0.bb RDEPENDS on or otherwise requires it) No eligible RPROVIDERs exist for 'bcc' NOTE: Runtime target 'bcc' is unbuildable, removing... Missing or unbuildable dependency chain was: ['bcc'] --- .../meta-python/recipes-devtools/bcc/bcc/run-ptest | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 dynamic-layers/meta-python/recipes-devtools/bcc/bcc/run-ptest (limited to 'dynamic-layers/meta-python/recipes-devtools/bcc/bcc/run-ptest') diff --git a/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/run-ptest b/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/run-ptest new file mode 100644 index 0000000..a27f697 --- /dev/null +++ b/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/run-ptest @@ -0,0 +1,42 @@ +#!/bin/sh + +cd tests || exit 1 + +PASS_CNT=0 +FAIL_CNT=0 +FAILED="" + +print_test_result() { + if [ $? -eq 0 ]; then + echo PASS: "$1" + PASS_CNT=$((PASS_CNT + 1)) + else + echo FAIL: "$1" + FAIL_CNT=$((FAIL_CNT + 1)) + FAILED="$FAILED $1;" + fi +} + +# Run CC tests, set IFS as test names have spaces +IFS=$(printf '\n\t') +for test_name in $(./cc/test_libbcc_no_libbpf --list-test-names-only); do + ./cc/test_libbcc_no_libbpf "$test_name" > /dev/null 2>&1 + print_test_result "cc $test_name" +done +unset IFS + +# Run python tests, skip namespace tests as they currently don't work +if cmake -DCMAKE_TESTING_ENABLED=ON -DTEST_WRAPPER="$(pwd)/ptest_wrapper.sh" python > /dev/null 2>&1; then + for test_name in $(awk -F '[( ]' '/^add_test/ && !/namespace/ {print $2}' CTestTestfile.cmake); do + ctest -Q -R "$test_name" + print_test_result "python $test_name" + done +else + print_test_result "cmake error, couldn't start python tests" +fi + +echo "#### bcc tests summary ####" +echo "# TOTAL: $((PASS_CNT + FAIL_CNT))" +echo "# PASS: $PASS_CNT" +echo "# FAIL: $FAIL_CNT ($FAILED)" +echo "###########################" -- cgit v1.2.3-54-g00ecf