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 echo "signature mismatch: reference $1 obtained $signature"
22 echo "signature OK: $signature"
25 # just report signature