summaryrefslogtreecommitdiff
path: root/bin/ai/regression
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ai/regression')
-rwxr-xr-xbin/ai/regression/run.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/ai/regression/run.sh b/bin/ai/regression/run.sh
index 2e86f3b87..1da1ad2ce 100755
--- a/bin/ai/regression/run.sh
+++ b/bin/ai/regression/run.sh
@@ -28,6 +28,7 @@ else
./openttd -x -c ai/regression/regression.cfg $params -g ai/regression/regression.sav -d ai=2 2>&1 | awk '{ gsub("0x(\\(nil\\)|0+)(x0)?", "0x00000000", $0); gsub("^dbg: \\[ai\\]", "", $0); gsub("^ ", "ERROR: ", $0); gsub("ERROR: \\[1\\] ", "", $0); gsub("\\[P\\] ", "", $0); print $0; }' > tmp.regression
fi
+ret=0
if [ -z "$gdb" ]; then
res="`diff -ub ai/regression/regression.txt tmp.regression`"
if [ -z "$res" ]; then
@@ -35,6 +36,7 @@ if [ -z "$gdb" ]; then
else
echo "Regression test failed! Difference:"
echo "$res"
+ ret=1
fi
echo ""
echo "Regression test done"
@@ -49,3 +51,5 @@ fi
if [ "$1" != "-k" ]; then
rm -f tmp.regression
fi
+
+exit $ret