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

[19839] Fix flow controllers utests compilation when using Fast CDR from thirdparty #3979

Merged
merged 2 commits into from
Nov 2, 2023

Conversation

EduPonz
Copy link

@EduPonz EduPonz commented Oct 31, 2023

Description

The Flow controllers unit test end up including <fastcdr/cdr/fixed_size_string.hpp> through the internal header src/cpp/statistics/types/types.h, but they do not link with Fast CDR. In a colcon context this is OK as Fast CDR will always be compiled and installed before compiling Fast DDS, so its header are in the include path when compiling the unit tests. However, when using the Fast CDR submodule, CMake may start by compiling the unit tests prior to Fast CDR and Fast DDS, and in that case the Fast CDR headers are not in the include path. This PR fixes this by explicitly linking with Fast CDR in those tests.

@Mergifyio backport 2.11.x 2.10.x 2.6.x

Contributor Checklist

  • Commit messages follow the project guidelines.
  • The code follows the style guidelines of this project.
  • N/A: Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added; the added tests pass locally
  • N/A: Any new/modified methods have been properly documented using Doxygen.
  • N/A: Changes are ABI compatible.
  • N/A: Changes are API compatible.
  • N/A: New feature has been added to the versions.md file (if applicable).
  • N/A: New feature has been documented/Current behavior is correctly described in the documentation.
  • Applicable backports have been included in the description.

Reviewer Checklist

  • The PR has a milestone assigned.
  • Check contributor checklist is correct.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

@EduPonz EduPonz added this to the v2.12.1 milestone Oct 31, 2023
test/unittest/rtps/flowcontrol/CMakeLists.txt Outdated Show resolved Hide resolved
test/unittest/rtps/flowcontrol/CMakeLists.txt Outdated Show resolved Hide resolved
test/unittest/rtps/flowcontrol/CMakeLists.txt Outdated Show resolved Hide resolved
@EduPonz EduPonz added the skip-ci Automatically pass CI label Nov 2, 2023
@EduPonz EduPonz merged commit a2e699c into master Nov 2, 2023
8 checks passed
@EduPonz EduPonz deleted the hotfix/unit_test_compilation_w_thirdparty branch November 2, 2023 08:12
@EduPonz
Copy link
Author

EduPonz commented Nov 2, 2023

@Mergifyio backport 2.11.x 2.10.x 2.6.x

Copy link
Contributor

mergify bot commented Nov 2, 2023

mergify bot pushed a commit that referenced this pull request Nov 2, 2023
…dparty (#3979)

* Refs #19839: Fix flow controllers utests compilation when using Fast CDR from thirdparty

Signed-off-by: EduPonz <[email protected]>

* Refs #19839: Apply Ricardo's suggestions

Signed-off-by: EduPonz <[email protected]>

---------

Signed-off-by: EduPonz <[email protected]>
(cherry picked from commit a2e699c)
mergify bot pushed a commit that referenced this pull request Nov 2, 2023
…dparty (#3979)

* Refs #19839: Fix flow controllers utests compilation when using Fast CDR from thirdparty

Signed-off-by: EduPonz <[email protected]>

* Refs #19839: Apply Ricardo's suggestions

Signed-off-by: EduPonz <[email protected]>

---------

Signed-off-by: EduPonz <[email protected]>
(cherry picked from commit a2e699c)
mergify bot pushed a commit that referenced this pull request Nov 2, 2023
…dparty (#3979)

* Refs #19839: Fix flow controllers utests compilation when using Fast CDR from thirdparty

Signed-off-by: EduPonz <[email protected]>

* Refs #19839: Apply Ricardo's suggestions

Signed-off-by: EduPonz <[email protected]>

---------

Signed-off-by: EduPonz <[email protected]>
(cherry picked from commit a2e699c)
EduPonz added a commit that referenced this pull request Nov 13, 2023
…dparty (#3979) (#3984)

* Refs #19839: Fix flow controllers utests compilation when using Fast CDR from thirdparty

Signed-off-by: EduPonz <[email protected]>

* Refs #19839: Apply Ricardo's suggestions

Signed-off-by: EduPonz <[email protected]>

---------

Signed-off-by: EduPonz <[email protected]>
(cherry picked from commit a2e699c)

Co-authored-by: Eduardo Ponz Segrelles <[email protected]>
EduPonz added a commit that referenced this pull request Nov 13, 2023
…dparty (#3979) (#3985)

* Refs #19839: Fix flow controllers utests compilation when using Fast CDR from thirdparty

Signed-off-by: EduPonz <[email protected]>

* Refs #19839: Apply Ricardo's suggestions

Signed-off-by: EduPonz <[email protected]>

---------

Signed-off-by: EduPonz <[email protected]>
(cherry picked from commit a2e699c)

Co-authored-by: Eduardo Ponz Segrelles <[email protected]>
EduPonz added a commit that referenced this pull request Nov 13, 2023
…dparty (#3979) (#3986)

* Refs #19839: Fix flow controllers utests compilation when using Fast CDR from thirdparty

Signed-off-by: EduPonz <[email protected]>

* Refs #19839: Apply Ricardo's suggestions

Signed-off-by: EduPonz <[email protected]>

---------

Signed-off-by: EduPonz <[email protected]>
(cherry picked from commit a2e699c)

Co-authored-by: Eduardo Ponz Segrelles <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-ci Automatically pass CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants