2 # obtain and optionally verify Bench / signature
3 # if no reference is given, the output is deliberately limited to just the signature
7 echo "running bench for signature failed on line $1"
10 trap 'error ${LINENO}' ERR
14 signature=`./stockfish bench 2>&1 | grep "Nodes searched : " | awk '{print $4}'`
17 # compare to given reference
18 if [ "$1" != "$signature" ]; then
19 if [ -z "$signature" ]; then
20 echo "No signature obtained from bench. Code crashed or assert triggered ?"
22 echo "signature mismatch: reference $1 obtained: $signature ."
26 echo "signature OK: $signature"
29 # just report signature