diagnostics icon indicating copy to clipboard operation
diagnostics copied to clipboard

Rewrite how test nodes are exported

Open trainman419 opened this issue 11 years ago • 1 comments

Given the sum total of issues #16, #24, #27 and #28, it sounds like the way testing nodes are exported to downstream packages needs to change.

  • Installing anything that is linked against gtest and meant to be used with user-compiled code is a bade idea and likely won't work, because gtest fails when different parts of it are compiled with different flags (ie the node, built on a build farm, and the user's code, built locally).
  • Users need to have a way to test their plugins. This was previously provided by the diagnostic_analyzer/analyzer_loader node. See #24
  • Users need to be able to run self tests from within their rostests. This was provided by the self_test/selftest_rostest node. See #16

The best proposed solution I've heard (thanks @wjwwood ! ) is to install the sources for the analyzer_loader and selftest_rostest, and provide an explicit set of cmake macros which will compile and run them as needed. Once that's written, the docs will need to be updated; at least http://wiki.ros.org/self_test , http://wiki.ros.org/diagnostics/Tutorials/Creating%20a%20Diagnostic%20Analyzer and http://wiki.ros.org/diagnostic_aggregator

I've exhausted my budget of employer-funded time to work on this for the next few months. If someone needs this fixed urgently, they'll have to provide a pull request.

trainman419 avatar Jul 31 '14 07:07 trainman419

It may also be possible to rewrite the analyzer_loader and rostest_selftest such that the top-level executable is a python script using nosetests or something similar to export test results, which then calls an internal C++ node (no gtest), to do the actual testing.

Since selftest_rostest is only calling services and parsing the results, it may be possible to completely rewrite it in python without changing the user-facing API.

trainman419 avatar Jul 31 '14 08:07 trainman419