Skip to content

Commit

Permalink
Detect libpcap before reading TMONLIST
Browse files Browse the repository at this point in the history
  • Loading branch information
ThinkerYzu1 committed Aug 14, 2024
1 parent 0e89b50 commit 136e33b
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions ci/vmtest/vmtest_selftests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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=()

Expand Down

0 comments on commit 136e33b

Please sign in to comment.