mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-06 10:53:50 +08:00
Enforce minimum compiler versions
gcc 9.3 clang 10 using unsupported compiler versions will generate an error, older version might miscompile SF CI: improves output on failed bench output closes https://github.com/official-stockfish/Stockfish/pull/6032 No functional change
This commit is contained in:
committed by
Joost VandeVondele
parent
73c55e8949
commit
9b79b75c9b
@@ -2,16 +2,26 @@
|
||||
# obtain and optionally verify Bench / signature
|
||||
# if no reference is given, the output is deliberately limited to just the signature
|
||||
|
||||
STDOUT_FILE=$(mktemp)
|
||||
STDERR_FILE=$(mktemp)
|
||||
|
||||
error()
|
||||
{
|
||||
echo "running bench for signature failed on line $1"
|
||||
echo "===== STDOUT ====="
|
||||
cat "$STDOUT_FILE"
|
||||
echo "===== STDERR ====="
|
||||
cat "$STDERR_FILE"
|
||||
rm -f "$STDOUT_FILE" "$STDERR_FILE"
|
||||
exit 1
|
||||
}
|
||||
trap 'error ${LINENO}' ERR
|
||||
|
||||
# obtain
|
||||
eval "$WINE_PATH ./stockfish bench" > "$STDOUT_FILE" 2> "$STDERR_FILE" || error ${LINENO}
|
||||
signature=$(grep "Nodes searched : " "$STDERR_FILE" | awk '{print $4}')
|
||||
|
||||
signature=`eval "$WINE_PATH ./stockfish bench 2>&1" | grep "Nodes searched : " | awk '{print $4}'`
|
||||
rm -f "$STDOUT_FILE" "$STDERR_FILE"
|
||||
|
||||
if [ $# -gt 0 ]; then
|
||||
# compare to given reference
|
||||
@@ -28,4 +38,4 @@ if [ $# -gt 0 ]; then
|
||||
else
|
||||
# just report signature
|
||||
echo $signature
|
||||
fi
|
||||
fi
|
||||
Reference in New Issue
Block a user