Skip to content

Commit

Permalink
fixing run_pytests install in CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
mgonzs13 committed Dec 16, 2024
1 parent e850b46 commit 06b4536
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions yasmin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ ament_python_install_package(${PROJECT_NAME})
# Tests
install(
DIRECTORY tests/python/
DESTINATION pytests/
DESTINATION pytests/${PROJECT_NAME}
)

install(
PROGRAMS tests/python/run_pytests.sh
PROGRAMS tests/run_pytests.sh
DESTINATION lib/${PROJECT_NAME}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
pkg=yasmin
ros_pkg_path=$(python3 -c "from ament_index_python.packages import get_package_prefix; print(get_package_prefix('$pkg'))")
py_pkg_path=$(python3 -c "import os, $pkg; print(os.path.dirname($pkg.__file__))")
python3 -m pytest --cov=$py_pkg_path $ros_pkg_path/pytests/*.py
python3 -m pytest --cov=$py_pkg_path $ros_pkg_path/pytests/$pkg/*.py
4 changes: 2 additions & 2 deletions yasmin_ros/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ ament_python_install_package(${PROJECT_NAME})
# Tests
install(
DIRECTORY tests/python/
DESTINATION pytests/
DESTINATION pytests/${PROJECT_NAME}
)

install(
PROGRAMS tests/python/run_pytests.sh
PROGRAMS tests/run_pytests.sh
DESTINATION lib/${PROJECT_NAME}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
pkg=yasmin_ros
ros_pkg_path=$(python3 -c "from ament_index_python.packages import get_package_prefix; print(get_package_prefix('$pkg'))")
py_pkg_path=$(python3 -c "import os, $pkg; print(os.path.dirname($pkg.__file__))")
python3 -m pytest --cov=$py_pkg_path $ros_pkg_path/pytests/*.py
python3 -m pytest --cov=$py_pkg_path $ros_pkg_path/pytests/$pkg/*.py

0 comments on commit 06b4536

Please sign in to comment.