File tree Expand file tree Collapse file tree 2 files changed +16
-14
lines changed
Expand file tree Collapse file tree 2 files changed +16
-14
lines changed Original file line number Diff line number Diff line change 6565 shell : bash
6666 run : |
6767 sudo yum install --setopt=tsflags=nodocs -y eigen3-devel ceres-solver-devel json-devel
68- sudo python -m pip install nanobind
68+ sudo python -m pip3 install nanobind pytest
6969
7070 - name : Configure CMake
7171 # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
@@ -153,7 +153,7 @@ jobs:
153153 shell : bash
154154 run : |
155155 sudo yum install --setopt=tsflags=nodocs -y eigen3-devel ceres-solver-devel json-devel
156- sudo python -m pip install nanobind
156+ sudo python -m pip3 install nanobind pytest
157157
158158 - name : Configure CMake
159159 # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
Original file line number Diff line number Diff line change @@ -202,18 +202,20 @@ add_test ( NAME Test_ImageConverter COMMAND Test_ImageConverter )
202202
203203################################################################################
204204# Python tests
205- find_program (PYTHON_EXECUTABLE python3)
206- if (PYTHON_EXECUTABLE)
207- add_test (
208- NAME Test_Python_ImageConverter
209- COMMAND ${PYTHON_EXECUTABLE} -m pytest ${CMAKE_CURRENT_SOURCE_DIR} /python/test_image_converter.py -v
210- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
211- )
212-
213- # Set environment for Python test to find the compiled module
214- set_tests_properties (Test_Python_ImageConverter PROPERTIES
215- ENVIRONMENT "PYTHONPATH=${CMAKE_BINARY_DIR} /src/bindings:$ENV{PYTHONPATH} "
216- )
205+ if (RTA_BUILD_PYTHON_BINDINGS)
206+ find_program (PYTHON_EXECUTABLE python3)
207+ if (PYTHON_EXECUTABLE)
208+ add_test (
209+ NAME Test_Python_ImageConverter
210+ COMMAND ${PYTHON_EXECUTABLE} -m pytest ${CMAKE_CURRENT_SOURCE_DIR} /python/test_image_converter.py -v
211+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
212+ )
213+
214+ # Set environment for Python test to find the compiled module
215+ set_tests_properties (Test_Python_ImageConverter PROPERTIES
216+ ENVIRONMENT "PYTHONPATH=${CMAKE_BINARY_DIR} /src/bindings:$ENV{PYTHONPATH} "
217+ )
218+ endif ()
217219endif ()
218220
219221################################################################################
You can’t perform that action at this time.
0 commit comments