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

[19546] Use FASTRTPS_NO_LIB on unittest root folder #3856

Merged
merged 1 commit into from
Sep 21, 2023

Conversation

MiguelCompany
Copy link
Member

@MiguelCompany MiguelCompany commented Sep 18, 2023

Description

Unit tests that use public headers exporting DLL symbols require FASTRTPS_NO_LIB to be defined in order to avoid the auto-link of the library, which might be counter-intuitive.

This PR adds that definition to the build flags on the CMakeLists.txt of the root test/unittest folder and removes it from the CMakeLists.txt of the individual tests.

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

Contributor Checklist

  • Commit messages follow the project guidelines.
  • N/A 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.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
@MiguelCompany MiguelCompany added the no-test Skip CI tests if PR marked with this label label Sep 18, 2023
@MiguelCompany MiguelCompany added this to the v2.12.1 milestone Sep 19, 2023
@MiguelCompany MiguelCompany merged commit e00b8e3 into master Sep 21, 2023
12 of 14 checks passed
@MiguelCompany MiguelCompany deleted the hotfix/unit-tests-no-lib branch September 21, 2023 09:58
@MiguelCompany
Copy link
Member Author

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

@mergify
Copy link
Contributor

mergify bot commented Sep 21, 2023

backport 2.11.x 2.10.x 2.6.x

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Sep 21, 2023
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
(cherry picked from commit e00b8e3)
mergify bot pushed a commit that referenced this pull request Sep 21, 2023
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
(cherry picked from commit e00b8e3)

# Conflicts:
#	test/unittest/dds/subscriber/CMakeLists.txt
#	test/unittest/security/accesscontrol/CMakeLists.txt
mergify bot pushed a commit that referenced this pull request Sep 21, 2023
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
(cherry picked from commit e00b8e3)

# Conflicts:
#	test/unittest/dds/subscriber/CMakeLists.txt
#	test/unittest/logging/log_macros/CMakeLists.txt
#	test/unittest/rtps/common/CMakeLists.txt
#	test/unittest/rtps/network/CMakeLists.txt
#	test/unittest/rtps/reader/CMakeLists.txt
#	test/unittest/security/accesscontrol/CMakeLists.txt
#	test/unittest/statistics/dds/CMakeLists.txt
JLBuenoLopez pushed a commit that referenced this pull request Oct 26, 2023
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
(cherry picked from commit e00b8e3)

Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
MiguelCompany added a commit that referenced this pull request Nov 28, 2023
* Use FASTRTPS_NO_LIB on unittest root folder (#3856)

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
(cherry picked from commit e00b8e3)

# Conflicts:
#	test/unittest/dds/subscriber/CMakeLists.txt
#	test/unittest/logging/log_macros/CMakeLists.txt
#	test/unittest/rtps/common/CMakeLists.txt
#	test/unittest/rtps/network/CMakeLists.txt
#	test/unittest/rtps/reader/CMakeLists.txt
#	test/unittest/security/accesscontrol/CMakeLists.txt
#	test/unittest/statistics/dds/CMakeLists.txt

* Fix conflicts

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

---------

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
EduPonz pushed a commit that referenced this pull request Dec 2, 2023
* Use FASTRTPS_NO_LIB on unittest root folder (#3856)

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
(cherry picked from commit e00b8e3)

# Conflicts:
#	test/unittest/dds/subscriber/CMakeLists.txt
#	test/unittest/security/accesscontrol/CMakeLists.txt

* Fix conflicts
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

---------

Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-test Skip CI tests if PR marked with this label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants