mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-30 05:09:06 +08:00
ci: switch to libbpf/ci/build-selftests action
Signed-off-by: Ihor Solodrai <ihor.solodrai@pm.me>
This commit is contained in:
committed by
Andrii Nakryiko
parent
a453ffb7ea
commit
dcf6ad6c70
8
ci/vmtest/prepare-selftests-build-5.5.0.sh
Executable file
8
ci/vmtest/prepare-selftests-build-5.5.0.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
cd "${SELFTESTS_BPF}"
|
||||
printf "all:\n\ttouch bpf_testmod.ko\n\nclean:\n" > bpf_testmod/Makefile
|
||||
printf "all:\n\ttouch bpf_test_no_cfi.ko\n\nclean:\n" > bpf_test_no_cfi/Makefile
|
||||
|
||||
41
ci/vmtest/prepare-selftests-run.sh
Executable file
41
ci/vmtest/prepare-selftests-run.sh
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
function append_into() {
|
||||
local out="$1"
|
||||
shift
|
||||
local files=("$@")
|
||||
echo -n > "$out"
|
||||
for file in "${files[@]}"; do
|
||||
cat "$file" >> "$out" || true
|
||||
done
|
||||
}
|
||||
|
||||
allowlists=(
|
||||
"${SELFTESTS_BPF}/ALLOWLIST"
|
||||
"${SELFTESTS_BPF}/ALLOWLIST.${ARCH}"
|
||||
"${VMTEST_CONFIGS}/ALLOWLIST"
|
||||
"${VMTEST_CONFIGS}/ALLOWLIST-${KERNEL}"
|
||||
"${VMTEST_CONFIGS}/ALLOWLIST-${KERNEL}.${ARCH}"
|
||||
)
|
||||
|
||||
append_into "${ALLOWLIST_FILE}" "${allowlists[@]}"
|
||||
|
||||
denylists=(
|
||||
"${SELFTESTS_BPF}/DENYLIST"
|
||||
"${SELFTESTS_BPF}/DENYLIST.${ARCH}"
|
||||
"${VMTEST_CONFIGS}/DENYLIST"
|
||||
"${VMTEST_CONFIGS}/DENYLIST-${KERNEL}"
|
||||
"${VMTEST_CONFIGS}/DENYLIST-${KERNEL}.${ARCH}"
|
||||
)
|
||||
|
||||
append_into "${DENYLIST_FILE}" "${denylists[@]}"
|
||||
|
||||
if [[ "${KERNEL}" == "5.5.0" ]]; then
|
||||
echo "KERNEL_TEST=test_progs test_progs_no_alu32" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
mkdir "${GITHUB_WORKSPACE}/selftests"
|
||||
cp -R "${SELFTESTS_BPF}" "${GITHUB_WORKSPACE}/selftests"
|
||||
|
||||
Reference in New Issue
Block a user