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

FPP v2.0 integration #2181

Merged
merged 10 commits into from
Sep 28, 2023
Merged

Conversation

tiffany1618
Copy link
Contributor

@tiffany1618 tiffany1618 commented Aug 3, 2023

Change Description

This PR integrates FPP v2.0, which adds support for C++ generation of unit test harness classes, with F Prime.

Unit tests for the FPP unit test autocoder have been added to the existing tests for FPP components.

Changes to Generated C++ Code for Unit Test Harnesses

General

  • Prepend the component name to the generated file names, e.g. [ComponentName]TesterBase.cpp instead of TesterBase.cpp. This allows the generation of test harness classes for multiple components within the same directory.

TesterBase classes

  • Reorganize class members (follows the same pattern as the reorganization of class members for component base classes, see FPP v1.3.0 integration #2103)
  • Change typedef struct {...} [name]; to struct [name] {...};
  • Move initialization of m_param_[paramName]_valid variable members from the init function to initializer lists in the constructor
  • Fix issue where [portName]_static and dispatch function implementations for special ports are not generated when the corresponding special port constructs do not appear (e.g. a component contains command ports, but no commands)
  • Change sizeof([serializableType]) to [serializableType]::SERIALIZED_SIZE where appropriate in the dispatchEvents function

To do before merging

  • Merge unit test code generation into FPP
  • Integrate unit test code generation with fprime tools
  • Create FPP pre-release to test PR
  • Create FPP release v2.0

@bocchino
Copy link
Collaborator

bocchino commented Aug 28, 2023

The top-level comment sets out the procedure for integrating FPP 2.0 into F Prime. However, the changes in this PR just improve code coverage of existing tests. I think this PR can be reviewed and merged now. Perhaps we should move the top-level comments and checklist to another issue focused on FPP 2.0 integration.

CI passes except for one failure that seems unrelated to this PR.

@LeStarch LeStarch force-pushed the fpp-unit-test-integration branch from 65e7f85 to 627127a Compare September 27, 2023 21:52
@thomas-bc thomas-bc merged commit f34d596 into nasa:devel Sep 28, 2023
Copy link
Collaborator

@bocchino bocchino 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!

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.

3 participants