diff --git a/ci/vmtest/vmtest_selftests.sh b/ci/vmtest/vmtest_selftests.sh index a9a8622..81000da 100755 --- a/ci/vmtest/vmtest_selftests.sh +++ b/ci/vmtest/vmtest_selftests.sh @@ -21,6 +21,7 @@ OUTPUT_DIR=/mnt/vmtest WORKING_DIR="/${PROJECT_NAME}" BPF_SELFTESTS_DIR="${WORKING_DIR}/selftests/bpf" VMTEST_CONFIGS_PATH="${WORKING_DIR}/ci/vmtest/configs" +PKG_CONFIG=pkg-config read_lists() { (for path in "$@"; do @@ -42,13 +43,16 @@ ALLOWLIST=$(read_lists \ "$BPF_SELFTESTS_DIR/ALLOWLIST.${ARCH}" \ "$VMTEST_CONFIGS_PATH/ALLOWLIST" \ "$VMTEST_CONFIGS_PATH/ALLOWLIST.${ARCH}" \ -) -TMONLIST=$(read_lists \ - "$BPF_SELFTESTS_DIR/TMONLIST" \ - "$BPF_SELFTESTS_DIR/TMONLIST.${ARCH}" \ - "$VMTEST_CONFIGS_PATH/TMONLIST" \ - "$VMTEST_CONFIGS_PATH/TMONLIST.${ARCH}" \ -) + ) + +if ${PKG_CONFIG} --exists libpcap 2>/dev/null; then + TMONLIST=$(read_lists \ + "$BPF_SELFTESTS_DIR/TMONLIST" \ + "$BPF_SELFTESTS_DIR/TMONLIST.${ARCH}" \ + "$VMTEST_CONFIGS_PATH/TMONLIST" \ + "$VMTEST_CONFIGS_PATH/TMONLIST.${ARCH}" \ + ) +fi declare -a TEST_NAMES=()