summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarish Sadineni <Harish.Sadineni@windriver.com>2025-06-24 04:40:23 -0700
committerKhem Raj <raj.khem@gmail.com>2025-07-02 09:44:04 -0700
commit2ef9449dc02fa010b0f8d235bebe118e13bdaf60 (patch)
tree05da50271bc757221536056cbeeb402b0960edbb
parent944524b4ba2a756d578f5e7469113f9f5ddd2a26 (diff)
downloadmeta-clang-2ef9449dc02fa010b0f8d235bebe118e13bdaf60.tar.gz
bcc: export BCC_KERNEL_SOURCE in run-ptest
when running ptest for bcc we need to export BCC_KERNEL_SOURCE to resolve test errors. Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
-rw-r--r--dynamic-layers/meta-python/recipes-devtools/bcc/bcc/run-ptest23
1 files changed, 23 insertions, 0 deletions
diff --git a/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/run-ptest b/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/run-ptest
index a27f697..4740ae9 100644
--- a/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/run-ptest
+++ b/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/run-ptest
@@ -17,6 +17,29 @@ print_test_result() {
17 fi 17 fi
18} 18}
19 19
20ARCH=$(uname -m)
21
22case "$ARCH" in
23 x86_64)
24 KDIR="x86"
25 ;;
26 riscv64)
27 KDIR="riscv"
28 ;;
29 aarch64)
30 KDIR="arm64"
31 ;;
32 powerpc64le | ppc64le)
33 KDIR="powerpc"
34 ;;
35 *)
36 echo "Architecture not present, Add the architecture in run-ptest: $ARCH"
37 exit 1
38 ;;
39esac
40
41export BCC_KERNEL_SOURCE="/usr/src/kernel/arch/$KDIR"
42
20# Run CC tests, set IFS as test names have spaces 43# Run CC tests, set IFS as test names have spaces
21IFS=$(printf '\n\t') 44IFS=$(printf '\n\t')
22for test_name in $(./cc/test_libbcc_no_libbpf --list-test-names-only); do 45for test_name in $(./cc/test_libbcc_no_libbpf --list-test-names-only); do