diff --git a/yasmin/CMakeLists.txt b/yasmin/CMakeLists.txt index eb42c00..62ef372 100644 --- a/yasmin/CMakeLists.txt +++ b/yasmin/CMakeLists.txt @@ -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} ) diff --git a/yasmin/tests/python/run_pytests.sh b/yasmin/tests/run_pytests.sh similarity index 76% rename from yasmin/tests/python/run_pytests.sh rename to yasmin/tests/run_pytests.sh index f4abd3f..42920f0 100755 --- a/yasmin/tests/python/run_pytests.sh +++ b/yasmin/tests/run_pytests.sh @@ -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 diff --git a/yasmin_ros/CMakeLists.txt b/yasmin_ros/CMakeLists.txt index c31c8d5..64be9cd 100644 --- a/yasmin_ros/CMakeLists.txt +++ b/yasmin_ros/CMakeLists.txt @@ -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} ) diff --git a/yasmin_ros/tests/python/run_pytests.sh b/yasmin_ros/tests/run_pytests.sh similarity index 77% rename from yasmin_ros/tests/python/run_pytests.sh rename to yasmin_ros/tests/run_pytests.sh index a9b4d15..e20c1e3 100755 --- a/yasmin_ros/tests/python/run_pytests.sh +++ b/yasmin_ros/tests/run_pytests.sh @@ -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