File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 30
30
31
31
import os
32
32
import unittest
33
+ import psutil
33
34
import subprocess
34
35
35
36
from ament_index_python .packages import get_package_share_directory
@@ -56,7 +57,7 @@ def generate_test_description():
56
57
"launch/three_robots.launch.py" ,
57
58
)
58
59
),
59
- launch_arguments = {"gui" : "false" }.items (),
60
+ launch_arguments = {"gui" : "false" , "sigterm_timeout" : "10" }.items (),
60
61
)
61
62
62
63
return LaunchDescription ([launch_include , ReadyToTest ()])
@@ -349,3 +350,10 @@ class TestDescriptionCraneShutdown(unittest.TestCase):
349
350
def test_exit_codes (self , proc_info ):
350
351
"""Check if the processes exited normally."""
351
352
launch_testing .asserts .assertExitCodes (proc_info )
353
+
354
+ def test_process_running (self ):
355
+ for proc in psutil .process_iter ():
356
+ # check whether the process name matches
357
+ if "ros2_control_node" in proc .name ():
358
+ print ("ros2_control_node found" )
359
+ proc .kill ()
You can’t perform that action at this time.
0 commit comments