#!/bin/bash

echo "测试RTSP流不可用情况下的报告生成"

# 确保output目录存在
mkdir -p /Users/wenhongquan/CLionProjects/jtjai_media/output

echo "运行程序..."
cd /Users/wenhongquan/CLionProjects/jtjai_media

# 运行程序并捕获输出
./cmake-build-debug/jtjai_media 2>&1 | tee test_output.log

echo "检查生成的文件..."
ls -la output/

echo "如果有报告文件，显示内容:"
for file in output/*.json; do
    if [ -f "$file" ]; then
        echo "=== $file ==="
        cat "$file"
        echo
    fi
done