diff options
author | rubidium <rubidium@openttd.org> | 2011-06-13 10:09:59 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-06-13 10:09:59 +0000 |
commit | 989bc411ef7a746e835a106632dbe5c53ea21076 (patch) | |
tree | 8fbc5e410f965095c773e45e984bdffc149a815e /bin | |
parent | dcc194e8eb5246f2cb1cc0b75225bcb12ab2e14c (diff) | |
download | openttd-989bc411ef7a746e835a106632dbe5c53ea21076.tar.xz |
(svn r22580) -Change: make 'make regression' return an error when it fails
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ai/regression/run.sh | 4 |
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 |