fix: multiple reports with: -m 1, --max-count, stop reading a file after 1 matching line

This commit is contained in:
Vlad Stan 2024-03-27 19:13:31 +02:00
parent 76af43fbe1
commit b381b2ad24

View file

@ -65,7 +65,7 @@ jobs:
echo "Running test with $file"
filename=$(basename "$file" ".jmx")
$GITHUB_WORKSPACE/apache-jmeter-5.6.2/bin/jmeter -n -t $file -l logs/$filename.log -e -o reports ;
error_count=$(cat jmeter.log | grep "summary =" | awk '{print $19}')
error_count=$(cat jmeter.log | grep -m 1 "summary =" | awk '{print $19}')
echo "Error count: '$error_count'"
echo "##########"
echo "$error_count" == "0"