35 lines
597 B
Bash
35 lines
597 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
if [ $# -ne 1 ]
|
||
|
then
|
||
|
echo "Please give path of test cases as parameter."
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
rundir=$(realpath "$(dirname "$0")")
|
||
|
|
||
|
cd "$1"
|
||
|
|
||
|
for i in Turnier\ *
|
||
|
do
|
||
|
echo "Running on data in $i"
|
||
|
|
||
|
if [ ! -r "$i/result.table" ]
|
||
|
then
|
||
|
echo "No result file is found. Skipping."
|
||
|
continue
|
||
|
fi
|
||
|
|
||
|
tmp=$(mktemp)
|
||
|
"$rundir/solo_runner.sh" --no-flask -a "$i/HTML" > "$tmp"
|
||
|
|
||
|
if diff -u "$i/result.table" "$tmp" > /dev/null
|
||
|
then
|
||
|
rm "$tmp"
|
||
|
else
|
||
|
echo "Differences found in competition $i"
|
||
|
mv "$tmp" "$i/result2.table"
|
||
|
fi
|
||
|
|
||
|
done
|