Automation of test to compare with previous runs
This commit is contained in:
parent
c4b2d0a23b
commit
727ce0ca3a
34
run-all-examples.sh
Executable file
34
run-all-examples.sh
Executable file
@ -0,0 +1,34 @@
|
||||
#!/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
|
Loading…
Reference in New Issue
Block a user