From 06b4536ac32f18beaebfa6df484a2237b2cd47c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Gonz=C3=A1lez=20Santamarta?= Date: Mon, 16 Dec 2024 21:40:39 +0100 Subject: [PATCH] fixing run_pytests install in CMakeLists.txt --- yasmin/CMakeLists.txt | 4 ++-- yasmin/tests/{python => }/run_pytests.sh | 2 +- yasmin_ros/CMakeLists.txt | 4 ++-- yasmin_ros/tests/{python => }/run_pytests.sh | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) rename yasmin/tests/{python => }/run_pytests.sh (76%) rename yasmin_ros/tests/{python => }/run_pytests.sh (77%) 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