Skip to content

Commit

Permalink
Handle multiple test runners correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
theihor committed Nov 11, 2024
1 parent 6bc77b6 commit 5db3a07
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions run-vmtest/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ foldable end bpftool_checks
foldable start vmtest "Starting virtual machine..."

# Tests may be comma-separated. vmtest_selftest expect them to come from CLI space-separated.
T=$(echo ${KERNEL_TEST} | tr -s ',' ' ')
TEST_RUNNERS=$(echo ${KERNEL_TEST} | tr -s ',' ' ')
vmtest -k "${VMLINUZ}" --kargs "panic=-1 sysctl.vm.panic_on_oom=1" \
"${GITHUB_ACTION_PATH}/vmtest-init.sh && \
cd '${GITHUB_WORKSPACE}' && \
${VMTEST_SCRIPT} ${T}"
${VMTEST_SCRIPT} ${TEST_RUNNERS}"

foldable end vmtest

Expand All @@ -92,13 +92,16 @@ fi

foldable end collect_status

# Try to collect json summary from VM
if [[ -n ${KERNEL_TEST} && ${KERNEL_TEST} =~ test_progs* ]]
then
## Job summary
"${GITHUB_ACTION_PATH}/print_test_summary.py" -s "${GITHUB_STEP_SUMMARY}" -j "${KERNEL_TEST}.json"
if [ -n "${TEST_RUNNERS}" ]; then
SUMMARIES=$(for runner in ${TEST_RUNNERS}; do echo "${runner}.json"; done)
else
SUMMARIES=$(find . -maxdepth 1 -name "test_*.json")
fi

for summary in ${SUMMARIES}; do
"${GITHUB_ACTION_PATH}/print_test_summary.py" -s "${GITHUB_STEP_SUMMARY}" -j "${summary}"
done

# Final summary - Don't use a fold, keep it visible
echo -e "\033[1;33mTest Results:\033[0m"
echo -e "$exitfile" | while read result; do
Expand Down

0 comments on commit 5db3a07

Please sign in to comment.