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