Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build simpler executable for just tests #175

Closed
wants to merge 1 commit into from

Conversation

gavanderhoorn
Copy link
Collaborator

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).

No need to start up a full MR2 if we're just looking to run unit tests.
@ted-miller
Copy link
Collaborator

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

  • Build w/ testing-flag enabled
  • Install .out file
  • Boot to run logical tests
  • Rebuild w/ testing-flag disabled
  • Install new .out file
  • Boot for normal mode to do physical 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
Copy link
Collaborator Author

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
Copy link
Collaborator

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
Copy link
Collaborator Author

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
Copy link
Collaborator

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
Copy link
Collaborator Author

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.

@gavanderhoorn gavanderhoorn deleted the simpler_testing_binary branch October 10, 2023 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants