Skip to content

Commit

Permalink
Pass unittest flag to python executable to make sure error code is se…
Browse files Browse the repository at this point in the history
…t to 1 if tests fail

Otherwise ctest will not report broken tests
  • Loading branch information
ll-nick committed Dec 19, 2024
1 parent 39a60cc commit e28824f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ if(pybind11_FOUND)
configure_file(${_py_test} ${PY_TEST_NAME} COPYONLY)

add_test(NAME ${PY_TEST_NAME}
COMMAND ${Python3_EXECUTABLE} ${PY_TEST_NAME}
COMMAND ${Python3_EXECUTABLE} -m unittest ${PY_TEST_NAME}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
endforeach()
Expand Down

0 comments on commit e28824f

Please sign in to comment.