projects
/
stockfish
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Prevent infinite loops on repetitions.
[stockfish]
/
tests
/
signature.sh
diff --git
a/tests/signature.sh
b/tests/signature.sh
index 2eb52c89be24c5a3e15e27c6faf996e5881b4d93..2e5c183a073cc8094ffb5f06e2526e01999a4c6a 100755
(executable)
--- a/
tests/signature.sh
+++ b/
tests/signature.sh
@@
-16,7
+16,12
@@
signature=`./stockfish bench 2>&1 | grep "Nodes searched : " | awk '{print $4}'
if [ $# -gt 0 ]; then
# compare to given reference
if [ "$1" != "$signature" ]; then
if [ $# -gt 0 ]; then
# compare to given reference
if [ "$1" != "$signature" ]; then
- echo "signature mismatch: reference $1 obtained $signature"
+ if [ -z "$signature" ]; then
+ echo "No signature obtained from bench. Code crashed or assert triggered ?"
+ else
+ echo "signature mismatch: reference $1 obtained: $signature ."
+ fi
+ exit 1
else
echo "signature OK: $signature"
fi
else
echo "signature OK: $signature"
fi