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

[19175] Ubuntu example testing automation infrastrucure #4466

Merged
merged 2 commits into from
Feb 29, 2024

Conversation

EduPonz
Copy link

@EduPonz EduPonz commented Feb 28, 2024

Description

This PR adds infrastructure to enable automated example testing using CTest. The approach consists on using docker compose to run the example executables (publisher and subscriber) both in different and same container instances, capturing the output to verify the correct functioning of the example in question. To launch the different compose commands and perform the validation, a python script within the pytest framework is used, and the pytest command is added as a CTest test in CMake. To enable the example testing, this PR also adds a new CMake option FASTDDS_EXAMPLE_TESTS which defaults to OFF.

With this infrastructure, adding new tests consists on simply adding the corresponding compose file and testing/verification function. It is important to note that even when the infrastructure is semi-prepared to support example testing in Windows, the only support that this PR provides is for Ubuntu, as some details regarding the Windows docker images are out of scope for now.

This PR depends on:

TODO:

  • Drop the commit DROP: changes for testing

Contributor Checklist

  • Commit messages follow the project guidelines.
  • The code follows the style guidelines of this project.
  • 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).
  • New feature has been documented/Current behavior is correctly described in the documentation. Documentation PR:
  • N/A: Applicable backports have been included in the description.

Reviewer Checklist

  • The PR has a milestone assigned.
  • The title and description correctly express the PR's purpose.
  • 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 needs-review PR that is ready to be reviewed doc-pending Issue or PR which is pending to be documented labels Feb 28, 2024
@EduPonz EduPonz added this to the v3.0.0 milestone Feb 28, 2024
@EduPonz EduPonz force-pushed the poc/example_testing_automation branch from 122a84f to a8fc37e Compare February 28, 2024 19:29
@EduPonz EduPonz removed the doc-pending Issue or PR which is pending to be documented label Feb 29, 2024
…ionExample test

Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
@EduPonz EduPonz added skip-ci Automatically pass CI and removed needs-review PR that is ready to be reviewed labels Feb 29, 2024
@EduPonz EduPonz force-pushed the poc/example_testing_automation branch from a8fc37e to e98c987 Compare February 29, 2024 10:14
@EduPonz
Copy link
Author

EduPonz commented Feb 29, 2024

CI passed here

@JesusPoderoso JesusPoderoso added the ready-to-merge Ready to be merged. CI and changes have been reviewed and approved. label Feb 29, 2024
@EduPonz EduPonz merged commit 613e7a0 into master Feb 29, 2024
9 checks passed
@EduPonz EduPonz deleted the poc/example_testing_automation branch February 29, 2024 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge Ready to be merged. CI and changes have been reviewed and approved. skip-ci Automatically pass CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants