From bca06bd087807d290bd8818948faba90c3bf1619 Mon Sep 17 00:00:00 2001 From: "meiyou.hr" Date: Mon, 27 May 2024 16:24:04 +0800 Subject: [PATCH 1/2] modify check_kconfig for wxb --- tests/anck-pack-and-boot/anck_build.sh | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/tests/anck-pack-and-boot/anck_build.sh b/tests/anck-pack-and-boot/anck_build.sh index 043999d..8d7c4ca 100644 --- a/tests/anck-pack-and-boot/anck_build.sh +++ b/tests/anck-pack-and-boot/anck_build.sh @@ -131,13 +131,19 @@ elif [ $1 == "build_anolis_debug_defconfig" ]; then elif [ $1 == "check_Kconfig" ]; then echo "== Check kconfig ==" check_status=0 - for cfg in $(ls arch/${kernel_arch}/configs/anolis_*); - do - echo "Check $cfg" - echo "CMD: cp -f $cfg .config && make ARCH=${kernel_arch} listnewconfig | grep -E '^CONFIG_' > .newoptions" - cp -f $cfg .config && make ARCH=${kernel_arch} listnewconfig | grep -E '^CONFIG_' > .newoptions - [ -s .newoptions ] && cat .newoptions && check_status=1; - done + if echo "$KERNEL_CI_REPO_BRANCH" | grep -q "6.6"; then + cd /anck_build/${anck_repo}/anolis + make dist-configs-check + check_status=$? + else + for cfg in $(ls arch/${kernel_arch}/configs/anolis_*); + do + echo "Check $cfg" + echo "CMD: cp -f $cfg .config && make ARCH=${kernel_arch} listnewconfig | grep -E '^CONFIG_' > .newoptions" + cp -f $cfg .config && make ARCH=${kernel_arch} listnewconfig | grep -E '^CONFIG_' > .newoptions + [ -s .newoptions ] && cat .newoptions && check_status=1; + done + fi show_result $1 $check_status elif [ $1 == "anck_rpm_build" ]; then echo "== Build Kernel RPM ==" -- Gitee From 5d0cd153544fa300497bb4e9d29a9692dd839068 Mon Sep 17 00:00:00 2001 From: "meiyou.hr" Date: Thu, 6 Jun 2024 15:25:15 +0800 Subject: [PATCH 2/2] distinguish kconfig check items by architecture --- tests/anck-pack-and-boot/anck_build.sh | 2 +- tests/anck-pack-and-boot/run.sh | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/tests/anck-pack-and-boot/anck_build.sh b/tests/anck-pack-and-boot/anck_build.sh index 44d4dd6..797ad2b 100644 --- a/tests/anck-pack-and-boot/anck_build.sh +++ b/tests/anck-pack-and-boot/anck_build.sh @@ -187,7 +187,7 @@ elif [ $1 == "check_Kconfig" ]; then check_status=0 if echo "$KERNEL_CI_REPO_BRANCH" | grep -q "6.6"; then cd /anck_build/${anck_repo}/anolis - make dist-configs-check + ARCH=${kernel_arch} make dist-configs-check check_status=$? else for cfg in $(ls arch/${kernel_arch}/configs/anolis_*); diff --git a/tests/anck-pack-and-boot/run.sh b/tests/anck-pack-and-boot/run.sh index df9cc55..e30ab8f 100755 --- a/tests/anck-pack-and-boot/run.sh +++ b/tests/anck-pack-and-boot/run.sh @@ -100,22 +100,19 @@ check_kapi() if [ -s "$kapi_test_log" ]; then echo "========show kapi compare result =========" + #stdout输出全部日志 + echo "$log_file_content" # 存储筛选后的内容 filtered_content="" - - # 使用flag标记是否收集代码块 collect_block=false - # 读取kapi_test_log文件逐行处理 while IFS= read -r line; do # https://aliyuque.antfin.com/prt6me/web95p/yv4a8wzkpmg3qym5?singleDoc# if echo "$line" | grep -q -E "Symbol removed or moved: func--|Changes detected in: func--"; then - # 关键字行开始收集 collect_block=true filtered_content+="$line\n" elif $collect_block; then - # 收集关键字行之后的内容 filtered_content+="$line\n" # 遇到空行或结束行停止收集 if [ -z "$line" ] || [[ "$line" =~ ^[[:space:]]*$ ]]; then @@ -124,7 +121,7 @@ check_kapi() fi done < "$kapi_test_log" - echo -e "$filtered_content" + # 文件中存储筛选后内容 echo -e "$filtered_content" > "$kapi_test_log" upload_archives "$kapi_test_log" -- Gitee