Yaskawa-Global / motoros2

ROS 2 (rcl, rclc & micro-ROS) node for MotoPlus-compatible Yaskawa Motoman robot controllers
89 stars 14 forks source link

Build simpler executable for just tests #175

Closed gavanderhoorn closed 9 months ago

gavanderhoorn commented 9 months ago

As per title.

Work towards #173.

Instead of starting up a full MotoROS2, exit immediately after running the unit tests.

Less work than a fully separate test VS project, but achieves some of the same goals (rapid iteration).

ted-miller commented 9 months ago

I don't understand the purpose of this PR. IIUC, to run the tests:

That's a rather time consuming process.

I understand the idea of having a dedicated executable for running unit tests against the main MR2 executable. But why wouldn't you want to leave the MR2 program running after the tests?

gavanderhoorn commented 9 months ago

why wouldn't you want to leave the MR2 program running after the tests?

because I'm working on some code for which I want to be able to quickly run some new tests, without having to wait for the "whole" startup sequence to complete.

With the proposed changes, after running the tests, it all just shuts down immediately. That's a 3 second total run time on my YRC1.

ted-miller commented 9 months ago

because I'm working on some code for which I want to be able to quickly run some new tests, without having to wait for the "whole" startup sequence to complete.

As in you're pushing a new .out file and loading it through the console? This isn't something that anyone else would be able to do.

gavanderhoorn commented 9 months ago

As in you're pushing a new .out file and loading it through the console? This isn't something that anyone else would be able to do.

We probably also don't expect non-developers to ever run the unit tests.

Personally I would not mix testing with regular usage, even when developing, but I get the impression you do. That would indeed be impossible with these changes.

ted-miller commented 9 months ago

We probably also don't expect non-developers to ever run the unit tests.

IMO, if you put something open-source in a public repo, it should be useable by anyone.

I would not mix testing with regular usage, even when developing, but I get the impression you do

Maybe not best practice, but generally yeah.

gavanderhoorn commented 9 months ago

I would not mix testing with regular usage, even when developing, but I get the impression you do

Maybe not best practice, but generally yeah.

Ok, well then this PR can't be merged.

We should really address #173 then.