From 989bc411ef7a746e835a106632dbe5c53ea21076 Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 13 Jun 2011 10:09:59 +0000 Subject: (svn r22580) -Change: make 'make regression' return an error when it fails --- bin/ai/regression/run.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bin/ai/regression') 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 -- cgit v1.2.3-70-g09d2