Skip to content

Add cmake unittest fakes for BLE and events #14515

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

Conversation

paul-szczepanek-arm
Copy link
Member

Summary of changes

This adds fakes for unittests for BLE and events. This requires a change in roles configurations for the roles to default to on so that unittests don't need to manually set the configs.

Impact of changes

Migration actions required

Documentation

none


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers


rajkan01 and others added 7 commits April 7, 2021 10:07
- Add a new MbedOS project in mbed os root CMake which can be used along with
  BUILD_TESTING conditional check for enabling the unittest build
- Update UNITTEST CMake for setting the CMake configuration like c, cxx flags etc.,
- Add if CMAKE_CROSSCOMPILING conditional check wherever target configuration check
  and toolchain configuration to avoid such configuration gets included for unittest build.
- add every libraries unittest directory into respective CMake
  which allows to include unittest source into build based on
  MBED_BUILD_UNITTESTS flag
- Remove the readme as it is a duplicate content of official document
  https://os.mbed.com/docs/mbed-os/v6.9/debug-test/unit-testing.html
@ciarmcom
Copy link
Member

ciarmcom commented Apr 8, 2021

@paul-szczepanek-arm, thank you for your changes.
@ARMmbed/mbed-os-maintainers please review.

@ciarmcom ciarmcom requested a review from a team April 8, 2021 11:30
Copy link
Member

@pan- pan- left a comment

Choose a reason for hiding this comment

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

The mocks are correct and setting default roles in the absence of configuration for unit test necessary.
Thanks for the changes @paul-szczepanek-arm

@rajkan01 rajkan01 force-pushed the feature_unittest_refactor branch from efd2180 to 32cd073 Compare April 13, 2021 12:26
@mergify mergify bot added the needs: work label Apr 13, 2021
@mergify
Copy link

mergify bot commented Apr 13, 2021

This PR cannot be merged due to conflicts. Please rebase to resolve them.

@mergify mergify bot removed the needs: review label Apr 13, 2021
@rajkan01 rajkan01 force-pushed the feature_unittest_refactor branch 13 times, most recently from 300f135 to 8944fc4 Compare April 15, 2021 10:34
@rajkan01 rajkan01 force-pushed the feature_unittest_refactor branch 15 times, most recently from a610d79 to 3ed97b1 Compare April 28, 2021 13:16
@ciarmcom ciarmcom added the stale Stale Pull Request label May 10, 2021
@ciarmcom
Copy link
Member

This pull request has automatically been marked as stale because it has had no recent activity. @paul-szczepanek-arm, please carry out any necessary work to get the changes merged. Thank you for your contributions.

@rajkan01 rajkan01 force-pushed the feature_unittest_refactor branch from 960b2c6 to 10625b3 Compare May 11, 2021 11:30
@ciarmcom ciarmcom added stale Stale Pull Request and removed stale Stale Pull Request labels May 14, 2021
@ciarmcom ciarmcom added stale Stale Pull Request and removed stale Stale Pull Request labels May 21, 2021
@ciarmcom ciarmcom added stale Stale Pull Request and removed stale Stale Pull Request labels May 28, 2021
@paul-szczepanek-arm
Copy link
Member Author

replaced by #14737

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.

4 participants