Skip to content

Commit

Permalink
dialogflow_task_executive: catkin_virtualenv : use SYSTEM_PACKAGES FALSE
Browse files Browse the repository at this point in the history
  • Loading branch information
k-okada committed Oct 29, 2023
1 parent 46efab0 commit 51940f1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions dialogflow_task_executive/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ elseif("$ENV{ROS_DISTRO}" STRGREATER "melodic")
catkin_generate_virtualenv(
INPUT_REQUIREMENTS requirements.in.noetic
PYTHON_INTERPRETER python3
USE_SYSTEM_PACKAGES FALSE
)
else()
catkin_generate_virtualenv(
Expand Down
1 change: 1 addition & 0 deletions dialogflow_task_executive/requirements.in.noetic
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ google-api-core[grpc]==1.33.0
grpcio-status==1.48.1
googleapis-common-protos[grpc]==1.56.2
protobuf==3.20.1 # fix Could not find a version that matches protobuf<4.0.0dev,<5.0.0dev,>=3.15.0,>=3.20.1,>=4.21.3 (from google-api-core[grpc]==1.33.1->dialogflow==1.1.1->-r requirements.in (line 1))
PyYAML==3.5.1 # USE_SYSTEM_PACKAGES FALSE needs yaml
12 changes: 8 additions & 4 deletions dialogflow_task_executive/test/test_rospy_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,15 @@ def test_rosnode(self):
full_scripts_dir = os.path.join(pkg_dir, scripts_dir)
if not os.path.exists(full_scripts_dir):
continue
for filename in [f for f in map(lambda x: os.path.join(full_scripts_dir, x), os.listdir(full_scripts_dir)) if os.path.isfile(f) and f.endswith('.py')]:
for filename in [f for f in map(lambda x: x, os.listdir(full_scripts_dir)) if os.path.isfile(f) and f.endswith('.py')]:
print("Check if {} is loadable".format(filename))
# https://stackoverflow.com/questions/4484872/why-doesnt-exec-work-in-a-function-with-a-subfunction
exec(open(filename, encoding='utf-8').read()) in globals(), locals()
self.assertTrue(True)
import subprocess
try:
ret = subprocess.check_output(['rosrun', pkg_name, filename], stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e:
print("Catch runtime error ({}), check if this is expect".format(e.output))
self.assertTrue('Check the device is connected and recognized' in e.output)


if __name__ == '__main__':
rostest.rosrun('test_rospy_node', pkg_name, TestRospyNode, sys.argv)

0 comments on commit 51940f1

Please sign in to comment.