Pass parameter to launch file through run_test

asked 2015-10-14 11:51:07 -0500

JakeBaldwin gravatar image

I would like to pass an argument to .test launch files in order to run only specific tests. Currently I can run all of my unit tests and node unit tests with: catkin_make run_tests

But I would like to pass an argument to the .test files and determine if that test should run or not like: catkin_make run_tests ARGS="runNodeTests"

Then in my .test file have something like:

<launch> <group if="runNodeTests"> <node name="serial_driver" pkg="my_package" type="serial_driver_node"/> <test test-name="serial_driver_test_node" pkg="my_package" type="Test"/> </group> </launch>

where runNodeTests either launches the node test or it doesn't.

Is this possible? (Sorry about the .test file formatting)

edit retag flag offensive close merge delete