mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 02:47:45 +00:00
New shell scripts for testing, used for travis CI (#957)
Perform more complex verification and validation. - signature.sh : extract and optionally compare Bench/Signature/Node count. - perft.sh : verify perft counts for a number of positions. - instrumented.sh : run a few commands or uci sequences through valgrind/sanitizer instrumented binaries. - reprosearch.sh : verify reproducibility of search. These script can be used from directly from the command line in the src directory. Update travis script to use these shell scripts. No functional change.
This commit is contained in:
committed by
Marco Costalba
parent
d39ffbeea6
commit
ba15781be8
Executable
+26
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
# obtain and optionally verify Bench / signature
|
||||
# if no reference is given, the output is deliberately limited to just the signature
|
||||
|
||||
error()
|
||||
{
|
||||
echo "running bench for signature failed on line $1"
|
||||
exit 1
|
||||
}
|
||||
trap 'error ${LINENO}' ERR
|
||||
|
||||
# obtain
|
||||
|
||||
signature=`./stockfish bench 2>&1 | grep "Nodes searched : " | awk '{print $4}'`
|
||||
|
||||
if [ $# -gt 0 ]; then
|
||||
# compare to given reference
|
||||
if [ "$1" != "$signature" ]; then
|
||||
echo "signature mismatch: reference $1 obtained $signature"
|
||||
else
|
||||
echo "signature OK: $signature"
|
||||
fi
|
||||
else
|
||||
# just report signature
|
||||
echo $signature
|
||||
fi
|
||||
Reference in New Issue
Block a user