From bbf90ebaa2bcdf2ce6e8b24b36345e1c9c18b681 Mon Sep 17 00:00:00 2001 From: griffin-warrior Date: Wed, 28 Oct 2026 05:25:56 +0800 Subject: [PATCH] kbench: skip the report check where python3 is absent, like ops_doc The counting is one python3 pass; exit 77 (ctest's SKIP_RETURN_CODE) where python3 is not present, the same posture ops_doc takes for plugins that will not dump. --- tests/CMakeLists.txt | 1 + tests/kernel_report_check.sh | 2 ++ 2 files changed, 3 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ed4ff261..4316c2d9 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -603,6 +603,7 @@ if(EXISTS ${CMAKE_SOURCE_DIR}/docs/KERNELS.md) ${CMAKE_SOURCE_DIR}/docs/KERNELS.md) set_tests_properties(kernel_report_check PROPERTIES LABELS "fast;unit" + SKIP_RETURN_CODE 77 TIMEOUT ${RAD_TEST_TIMEOUT}) endif() diff --git a/tests/kernel_report_check.sh b/tests/kernel_report_check.sh index fc411796..8bdd2326 100755 --- a/tests/kernel_report_check.sh +++ b/tests/kernel_report_check.sh @@ -13,6 +13,8 @@ set -u REPORT=$1 test -f "$REPORT" || { echo "kernel_report_check: no report at $REPORT"; exit 1; } +# The counting is one python3 pass; a host without it skips, like ops_doc's skip codes. +command -v python3 >/dev/null 2>&1 || { echo " SKIP python3 not present"; exit 77; } python3 - "$REPORT" <<'PY' import re, sys