run_selected_scripts

This commit is contained in:
James 2025-01-21 11:10:57 +08:00
parent db71552652
commit a1aa7daa99

View File

@ -500,7 +500,6 @@ run_all_scripts() {
clear clear
} }
# 执行选定的脚本
run_selected_scripts() { run_selected_scripts() {
clear clear
local base_output_file="NLvps_results_$(date +%Y%m%d_%H%M%S)" local base_output_file="NLvps_results_$(date +%Y%m%d_%H%M%S)"
@ -523,20 +522,26 @@ run_selected_scripts() {
fi fi
done done
IFS=',' read -ra selected_scripts <<< "$script_numbers" if [[ "$script_numbers" == "0" ]]; then
echo "开始执行选定的测试脚本..."
if [ "$script_numbers" == "0" ]; then
clear clear
show_welcome show_welcome
else return # 确保退出函数,不再继续执行
fi
# 分割用户输入为数组
IFS=',' read -ra selected_scripts <<< "$script_numbers"
echo "开始执行选定的测试脚本..."
for number in "${selected_scripts[@]}"; do for number in "${selected_scripts[@]}"; do
clear clear
run_script "$number" "$base_output_file" run_script "$number" "$base_output_file"
done done
# 所有脚本执行完毕后生成 Markdown 输出
generate_markdown_output "$base_output_file" generate_markdown_output "$base_output_file"
fi
} }
# 主菜单 # 主菜单
main_menu() { main_menu() {
echo -e "${GREEN}测试项目:${NC}YabsIP质量流媒体解锁响应测试多线程测试单线程测试回程路由。" echo -e "${GREEN}测试项目:${NC}YabsIP质量流媒体解锁响应测试多线程测试单线程测试回程路由。"