edmonds-matching-algorithm/run_tests.sh

25 lines
420 B
Bash
Raw Normal View History

2023-11-05 12:50:19 +01:00
GRAPHS=../graphs/
SUCC=()
FAILED=()
while read -r instance opt; do
linecount=$(./build/main $GRAPHS/$instance | wc -l)
result=$(($linecount - 1))
if [ "$result" -eq "$opt" ];
then
SUCC+=("$instance: $opt")
else
FAILED+=("$instance: $result/$opt")
fi
echo "$instance $result/$opt"
done < tests.txt
echo
echo "Success:"
printf '%s\n' "${SUCC[@]}"
echo
echo "Failed:"
printf '%s\n' "${FAILED[@]}"