mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00

use a fixed compiler on Linux and Windows (right now gcc 11). build avxvnni on Windows (Linux needs updated core utils) build x86-32 on Linux (Windows needs other mingw) fix a Makefile issue where a failed PGOBENCH would not stop the build reuse the WINE_PATH for SDE as we do for QEMU use WINE_PATH variable also for the signature verify the bench for each of the binaries do not build x86-64-avx2 on macos closes https://github.com/official-stockfish/Stockfish/pull/4682 No functional change
31 lines
784 B
Bash
Executable file
31 lines
784 B
Bash
Executable file
#!/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=`eval "$WINE_PATH ./stockfish bench 2>&1" | grep "Nodes searched : " | awk '{print $4}'`
|
|
|
|
if [ $# -gt 0 ]; then
|
|
# compare to given reference
|
|
if [ "$1" != "$signature" ]; then
|
|
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
|
|
# just report signature
|
|
echo $signature
|
|
fi
|