Changeset - r10889:5a1d7a81f15c
[Not reviewed]
master
0 1 0
glx - 15 years ago 2009-01-23 14:40:19
glx@openttd.org
(svn r15224) -Fix (r15213): incorrect regex
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
bin/ai/regression/run.sh
Show inline comments
 
@@ -16,25 +16,25 @@ fi
 

	
 
params=""
 
gdb=""
 
if [ "$1" != "-r" ]; then
 
	params="-snull -mnull -vnull:ticks=30000"
 
fi
 
if [ "$1" = "-g" ]; then
 
	gdb="gdb --ex run --args "
 
fi
 
if [ -n "$gdb" ]; then
 
	$gdb ./openttd -x -c ai/regression/regression.cfg $params -g ai/regression/regression.sav
 
else
 
	./openttd -x -c ai/regression/regression.cfg $params -g ai/regression/regression.sav -d ai=2 2>&1 | awk '{ gsub("0x(\\(nil\\)|0)", "0x00000000", $0); gsub("^dbg: \\[ai\\]", "", $0); gsub("^ ", "ERROR: ", $0); gsub("ERROR: \\[1\\] ", "", $0); gsub("\\[P\\] ", "", $0); print $0; }' > tmp.regression
 
	./openttd -x -c ai/regression/regression.cfg $params -g ai/regression/regression.sav -d ai=2 2>&1 | awk '{ gsub("0x(\\(nil\\)|0+)", "0x00000000", $0); gsub("^dbg: \\[ai\\]", "", $0); gsub("^ ", "ERROR: ", $0); gsub("ERROR: \\[1\\] ", "", $0); gsub("\\[P\\] ", "", $0); print $0; }' > tmp.regression
 
fi
 

	
 
if [ -z "$gdb" ]; then
 
	res="`diff -ub ai/regression/regression.txt tmp.regression`"
 
	if [ -z "$res" ]; then
 
		echo "Regression test passed!"
 
	else
 
		echo "Regression test failed! Difference:"
 
		echo "$res"
 
	fi
 
	echo ""
 
	echo "Regression test done"
0 comments (0 inline, 0 general)