diff options
Diffstat (limited to 'dynamic-layers')
-rw-r--r-- | dynamic-layers/meta-python/recipes-devtools/bcc/bcc/run-ptest | 23 |
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 | ||
20 | ARCH=$(uname -m) | ||
21 | |||
22 | case "$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 | ;; | ||
39 | esac | ||
40 | |||
41 | export 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 |
21 | IFS=$(printf '\n\t') | 44 | IFS=$(printf '\n\t') |
22 | for test_name in $(./cc/test_libbcc_no_libbpf --list-test-names-only); do | 45 | for test_name in $(./cc/test_libbcc_no_libbpf --list-test-names-only); do |