Skip to content

Commit

Permalink
test: Enable golang tests.
Browse files Browse the repository at this point in the history
Signed-off-by: Francis Laniel <[email protected]>
  • Loading branch information
eiffel-fl committed Feb 1, 2023
1 parent 97f5c56 commit cb08891
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ option(ENABLE_EXAMPLES "Build examples" ON)
option(ENABLE_MAN "Build man pages" ON)
option(ENABLE_TESTS "Build tests" ON)
option(RUN_LUA_TESTS "Run lua tests" ON)
option(RUN_GOLANG_TESTS "Run golang tests" ON)
option(ENABLE_LIBDEBUGINFOD "Use libdebuginfod as a source of debug symbols" ON)
CMAKE_DEPENDENT_OPTION(ENABLE_CPP_API "Enable C++ API" ON "ENABLE_USDT" OFF)

Expand Down
1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ if(ENABLE_CLANG_JIT)
add_subdirectory(cc)
add_subdirectory(python)
add_subdirectory(lua)
add_subdirectory(golang)
endif()
8 changes: 8 additions & 0 deletions tests/golang/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
find_program(GO go)

if(RUN_GOLANG_TESTS)
if(GO)
add_test(NAME golang_test WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND ${TEST_WRAPPER} golang_test sudo ${GO} test .)
endif()
endif()

0 comments on commit cb08891

Please sign in to comment.