Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ endfunction ()
configure_file (CTestCustom.cmake "${BenBot_BINARY_DIR}/CTestCustom.cmake" @ONLY)

add_subdirectory (fastchess)
add_subdirectory (matetrack)
add_subdirectory (perft)
add_subdirectory (position-solver)
add_subdirectory (rampart)
Expand Down
43 changes: 43 additions & 0 deletions tests/matetrack/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# ======================================================================================
#
# ░▒▓███████▓▒░░▒▓████████▓▒░▒▓███████▓▒░ ░▒▓███████▓▒░ ░▒▓██████▓▒░▒▓████████▓▒░
# ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░
# ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░
# ░▒▓███████▓▒░░▒▓██████▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓███████▓▒░░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░
# ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░
# ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░
# ░▒▓███████▓▒░░▒▓████████▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓███████▓▒░ ░▒▓██████▓▒░ ░▒▓█▓▒░
#
# ======================================================================================

check_python_modules_available (deps_available chess tqdm)

add_feature_info (benbot_matetrack_testing deps_available "BenBot matetrack testing")

if (NOT deps_available)
return ()
endif ()

FetchContent_Declare (
matetrack
SYSTEM
GIT_REPOSITORY "https://github.com/vondele/matetrack.git"
GIT_TAG origin/master
OVERRIDE_FIND_PACKAGE
)

FetchContent_MakeAvailable (matetrack)

add_test (
NAME ben_bot.matetrack
COMMAND Python::Interpreter matecheck.py --engine "$<TARGET_FILE:ben_bot>" --epdFile
mates2000.epd --nodes 10000 --depth 10 --time 30 --showAllIssues --showAllStats --bench
WORKING_DIRECTORY "${matetrack_SOURCE_DIR}"
CONFIGURATIONS Release
)

set_property (
TEST ben_bot.matetrack APPEND
PROPERTY FAIL_REGULAR_EXPRESSION "the following issues were detected:"
"Exception parsing pv from info:"
)
12 changes: 12 additions & 0 deletions tests/matetrack/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# matetrack tests

This directory implements test cases using the [matetrack](https://github.com/vondele/matetrack) tool to check the engine's mate-finding efficiency.

## Dependencies

### Programs
* Python interpreter

### Python libraries
* [python-chess](https://python-chess.readthedocs.io/en/latest/index.html), needed by matetrack script
* [tqdm](https://pypi.org/project/tqdm/), needed by matetrack script
Loading