This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
cs:testing:start [2019/04/14 22:39] Andrew Rink Added commands for compile/run tests |
cs:testing:start [2019/04/14 22:55] Andrew Rink |
||
---|---|---|---|
Line 13: | Line 13: | ||
===== Compiling and Running ===== | ===== Compiling and Running ===== | ||
- | To compile and run all tests, execute the following command from the ~/ros directory: | + | ==== Compile All Tests ==== |
+ | To compile all tests, execute the following command from any directory: | ||
<code bash> | <code bash> | ||
- | $ catkin_make run_tests | + | $ rsmake tests |
</code> | </code> | ||
- | To build just one specific test, execute the following command from the ~/ros directory: | + | ==== Run All Tests ==== |
+ | To run all tests, execute the following command from any directory: | ||
<code bash> | <code bash> | ||
- | $ catkin_make <test_name> | + | $ rsmake run_tests |
</code> | </code> | ||
- | The naming convention for tests is "test_" followed by the subsystem name, like "test_localization_system" | + | ==== Run One Test ==== |
- | + | To run a single test, execute the following command from any directory: | |
- | To run a specific test, navigate to the directory of that test (i.e. ~/ros/src/robosub/test/functional_tests/localization) and execute: | + | |
<code bash> | <code bash> | ||
- | $ rostest <test_name> | + | $ rostest robosub <test_name> |
</code> | </code> | ||
- | By default, rostest creates a new master for all publishers and subscribers. If you wish to view messages being passed between nodes, simply add ''--reuse-master'' to the above command. | + | By default, rostest creates a new master for all publishers and subscribers. If you wish to view messages being passed between nodes, simply add ''%%--%%reuse-master'' to the above command. |