diff --git a/run-all-examples.sh b/run-all-examples.sh new file mode 100755 index 0000000..cf2a5a6 --- /dev/null +++ b/run-all-examples.sh @@ -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