test_how_decode_v9.sh 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #!/bin/bash
  2. # HOW解构V9测试脚本
  3. # 测试集:从三个账号各选2个帖子,共6个测试用例
  4. echo "========================================================================================================"
  5. echo "HOW解构V9测试 - 共 6 个测试用例"
  6. echo "========================================================================================================"
  7. # 测试用例数组
  8. test_cases=(
  9. # 阿里多多酱(宠物类账号)
  10. # "阿里多多酱|examples_new/阿里多多酱/output/685b593800000000120141d3_20251104_111017.json"
  11. # "阿里多多酱|examples_new/阿里多多酱/output/6865e3ac00000000100251b6_20251104_111021.json"
  12. # 白流苏(美甲类账号)
  13. "白流苏|examples_new/白流苏/output/682c53fd000000000303c64f_20251104_112822.json"
  14. "白流苏|examples_new/白流苏/output/6839827d0000000003039f7e_20251104_112821.json"
  15. # 摸鱼阿希
  16. "摸鱼阿希|examples_new/摸鱼阿希/output/61bdc28b0000000001024896_20251104_132959.json"
  17. "摸鱼阿希|examples_new/摸鱼阿希/output/66619827000000000600486f_20251104_133004.json"
  18. )
  19. total=${#test_cases[@]}
  20. current=1
  21. success_count=0
  22. failed_count=0
  23. for test_case in "${test_cases[@]}"; do
  24. # 分割账号和文件路径
  25. IFS='|' read -r account file_path <<< "$test_case"
  26. echo ""
  27. echo "========================================================================================================"
  28. echo "测试用例 $current/$total"
  29. echo "账号: $account"
  30. echo "文件: $file_path"
  31. echo "========================================================================================================"
  32. # 运行测试
  33. if python how_decode_v9_point_dependency.py "$file_path"; then
  34. echo ""
  35. echo "✅ 测试用例 $current 完成"
  36. ((success_count++))
  37. else
  38. echo ""
  39. echo "❌ 测试用例 $current 失败"
  40. ((failed_count++))
  41. fi
  42. # 除了最后一个,都等待2秒
  43. if [ $current -lt $total ]; then
  44. echo ""
  45. echo "⏸ 等待2秒后继续下一个测试用例..."
  46. sleep 2
  47. fi
  48. ((current++))
  49. done
  50. echo ""
  51. echo "========================================================================================================"
  52. echo "测试完成!"
  53. echo "总计: $total 个用例"
  54. echo "成功: $success_count 个"
  55. echo "失败: $failed_count 个"
  56. echo "========================================================================================================"