Skip to content

Commit

Permalink
Disable Go API until tests are fixed.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 706721698
Change-Id: Ie91a052b06cf8fc20423be17dc905320847f555f
  • Loading branch information
lanctot committed Dec 16, 2024
1 parent 4907fa2 commit d04c13c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
6 changes: 5 additions & 1 deletion open_spiel/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,11 @@ add_subdirectory (games)
add_subdirectory (game_transforms)

if (OPEN_SPIEL_BUILD_WITH_GO)
add_subdirectory(go)
message(WARNING
"GO API is disabled for now due to failing tests.\n"
"See https://github.com/google-deepmind/open_spiel/issues/1301."
)
# add_subdirectory(go)
endif()

if (OPEN_SPIEL_BUILD_WITH_RUST)
Expand Down
19 changes: 14 additions & 5 deletions open_spiel/go/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# Note: GO API is disabled in ../CMakeLists.txt for now due to failing tests:
# # openspiel_test
# [openspiel_test]
# ./example_leduc_test.go:14:1: ExampleLeduc refers to unknown identifier: Leduc
# ./example_test.go:10:1: ExampleTicTacToe refers to unknown identifier: TicTacToe
# ./example_test.go:138:1: ExampleLoadParametrizedGame refers to unknown identifier: LoadParametrizedGame
# FAIL openspiel [build failed]

set(GO_BINDINGS ${GO_BINDINGS}
go_open_spiel.cc
go_open_spiel.h
Expand All @@ -24,8 +32,9 @@ endforeach(go_api_file)
execute_process(COMMAND go mod init openspiel
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})

add_test(NAME gospiel_test COMMAND go test -v)
set_property(TEST gospiel_test
PROPERTY ENVIRONMENT
LD_LIBRARY_PATH=${CMAKE_CURRENT_BINARY_DIR};
TEST_SRCDIR=${CMAKE_CURRENT_BINARY_DIR})

# add_test(NAME gospiel_test COMMAND go test -v)
# set_property(TEST gospiel_test
# PROPERTY ENVIRONMENT
# LD_LIBRARY_PATH=${CMAKE_CURRENT_BINARY_DIR};
# TEST_SRCDIR=${CMAKE_CURRENT_BINARY_DIR})

0 comments on commit d04c13c

Please sign in to comment.