Commit 936bec94 authored by jerrrrry's avatar jerrrrry
Browse files

Update .gitlab-ci.yml

parent b002a294
Pipeline #3299 failed
......@@ -150,55 +150,55 @@ benchmark_wan2.1:
# 备用方法:使用Python直接修改
python3 -c "
import re
with open('temp_test2.py', 'r') as f:
content = f.read()
# 使用正则表达式替换seed值
content = re.sub(r'(\"seed\":\s*)\d+', r'\g<1>1234567890', content)
import re
with open('temp_test2.py', 'r') as f:
content = f.read()
# 使用正则表达式替换seed值
content = re.sub(r'(\"seed\":\s*)\d+', r'\g<1>1234567890', content)
with open('temp_test2.py', 'w') as f:
f.write(content)
"
# 再次验证
if grep -q '"seed": 1234567890,' temp_test2.py; then
echo "✓ Seed 1234567890 successfully set using Python method"
grep -n '"seed": 1234567890,' temp_test2.py
else
echo "✗ All methods failed to set seed 1234567890"
echo "Full file content for debugging:"
cat temp_test2.py
exit 1
fi
with open('temp_test2.py', 'w') as f:
f.write(content)
"
# 再次验证
if grep -q '"seed": 1234567890,' temp_test2.py; then
echo "✓ Seed 1234567890 successfully set using Python method"
grep -n '"seed": 1234567890,' temp_test2.py
else
echo "✗ All methods failed to set seed 1234567890"
echo "Full file content for debugging:"
cat temp_test2.py
exit 1
fi
# 记录开始时间
start_time=$(date +%s)
# 运行测试
python temp_test2.py > results/test2_output.log 2>&1 &
export TEST2_PID=$!
echo "Waiting for second webp file to be generated..."
# 等待第二个webp文件生成,最多等待10分钟
timeout=600
count=0
while [ $count -lt $timeout ]; do
webp_count=$(find output -name "*.webp" -type f | wc -l)
if [ $webp_count -gt 1 ]; then
echo "Second webp file detected! Total count: $webp_count"
break
fi
sleep 2
count=$((count+2))
echo "Waiting... ${count}s elapsed, webp count: $webp_count"
done
if [ $count -eq $timeout ]; then
echo "Timeout waiting for second webp file"
exit 1
fi
fi
# 记录开始时间
start_time=$(date +%s)
# 运行测试
python temp_test2.py > results/test2_output.log 2>&1 &
export TEST2_PID=$!
echo "Waiting for second webp file to be generated..."
# 等待第二个webp文件生成,最多等待10分钟
timeout=600
count=0
while [ $count -lt $timeout ]; do
webp_count=$(find output -name "*.webp" -type f | wc -l)
if [ $webp_count -gt 1 ]; then
echo "Second webp file detected! Total count: $webp_count"
break
fi
sleep 2
count=$((count+2))
echo "Waiting... ${count}s elapsed, webp count: $webp_count"
done
if [ $count -eq $timeout ]; then
echo "Timeout waiting for second webp file"
exit 1
fi
# 记录结束时间和计算执行时间
end_time=$(date +%s)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment