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

auto-generate connect ports option. Fixes #934 #1786

Merged
merged 4 commits into from
Dec 21, 2022

Conversation

LeStarch
Copy link
Collaborator

Originating Project/Creator
Affected Component
Affected Architectures(s)
Related Issue(s) Fixes #934
Has Unit Tests (y/n) y
Builds Without Errors (y/n) y
Unit Tests Pass (y/n) y
Documentation Included (y/n) y

Change Description

Auto-generates connectComponents and initComponents helper functions into a TesterHelpers.cpp file. To use, a user sets the variable set(UT_AUTO_HELPERS ON).

It also moves the UT #define settings to Tester.hpp so it is available to this new helper file, while being available for users to set.

try:
from fprime_ac.generators.templates.test import test_helpers
except ImportError:
print("ERROR: must generate python templates first.")

Check notice

Code scanning / CodeQL

Use of a print statement at module level

Print statement may execute during import.
@LeStarch
Copy link
Collaborator Author

@thomas-bc this fixes #914 in a minimally invasive way. Would you review the code/cmake fixes? We can then discuss the approach with the team.

@LeStarch LeStarch linked an issue Nov 30, 2022 that may be closed by this pull request
@LeStarch
Copy link
Collaborator Author

Make the #define into proper constants.

@LeStarch LeStarch requested a review from thomas-bc December 21, 2022 01:27
@LeStarch LeStarch force-pushed the update/generate-test-helpers branch from d54daf7 to f338ebd Compare December 21, 2022 01:30
Copy link
Collaborator

@thomas-bc thomas-bc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@LeStarch LeStarch merged commit e596a2b into nasa:devel Dec 21, 2022
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.

Autogenerate separate Tester::connectPorts source file
2 participants