Mercurial > hg > openttd
changeset 17795:d3f875d362e4 draft
(svn r22580) -Change: make 'make regression' return an error when it fails
author | rubidium <rubidium@openttd.org> |
---|---|
date | Mon, 13 Jun 2011 10:09:59 +0000 |
parents | 7718bb59cb56 |
children | a5a8fa479f8c |
files | bin/ai/regression/run.sh |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/ai/regression/run.sh +++ b/bin/ai/regression/run.sh @@ -28,6 +28,7 @@ ./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 @@ else echo "Regression test failed! Difference:" echo "$res" + ret=1 fi echo "" echo "Regression test done" @@ -49,3 +51,5 @@ if [ "$1" != "-k" ]; then rm -f tmp.regression fi + +exit $ret