From 1ad2eb4a18e2e6f28644e9965accbc15243ec3c4 Mon Sep 17 00:00:00 2001 From: Jensfrank Date: Fri, 28 Jun 2024 23:28:27 +0800 Subject: [PATCH] Update nodeloc_vps_autotest_yabs.sh --- nodeloc_vps_autotest_yabs.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nodeloc_vps_autotest_yabs.sh b/nodeloc_vps_autotest_yabs.sh index ca87711..b651c3f 100644 --- a/nodeloc_vps_autotest_yabs.sh +++ b/nodeloc_vps_autotest_yabs.sh @@ -110,7 +110,10 @@ run_and_capture() { # 去除Yabs板块ANSI转义码并过滤特定输出 yabs_process_output() { local input="$1" - echo "$input" | sed -E 's/\x1b\[[0-9;]*[a-zA-Z]//g' | grep -v -E 'Preparing|Generating|Running|Performing' + # 去除ANSI转义码 + local processed_input=$(echo "$input" | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g") + # 过滤不需要的行 + echo "$processed_input" | grep -v -E 'Preparing|Generating|Running [^result]|Performing' } # 运行所有测试