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

Refactor connectivity netsocket unittests #14920

Merged

Conversation

hazzlim
Copy link
Contributor

@hazzlim hazzlim commented Jul 14, 2021

Summary of changes

Clean up CMake definitions of connectivity-netsocket unit tests to only include required source files, and to depend only on headers each test uses.

Fixes #14879

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 @ARMmbed/mbed-os-core

@ciarmcom ciarmcom added the release-type: patch Indentifies a PR as containing just a patch label Jul 14, 2021
@ciarmcom ciarmcom requested review from rajkan01 and a team July 14, 2021 16:30
@ciarmcom
Copy link
Member

@hazzlim, thank you for your changes.
@rajkan01 @ARMmbed/mbed-os-maintainers please review.

LDong-Arm
LDong-Arm previously approved these changes Jul 14, 2021
@mergify mergify bot added needs: CI and removed needs: review labels Jul 15, 2021
@ciarmcom
Copy link
Member

This pull request has automatically been marked as stale because it has had no recent activity. @ARMmbed/mbed-os-maintainers, please start CI to get the PR merged.

@ciarmcom ciarmcom added the stale Stale Pull Request label Jul 16, 2021
@0xc0170 0xc0170 removed the stale Stale Pull Request label Jul 16, 2021
0xc0170
0xc0170 previously approved these changes Jul 16, 2021
@0xc0170
Copy link
Contributor

0xc0170 commented Jul 16, 2021

CI started

@mbed-ci
Copy link

mbed-ci commented Jul 16, 2021

Jenkins CI Test : ✔️ SUCCESS

Build Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️

@mergify mergify bot added the needs: work label Jul 16, 2021
@hazzlim hazzlim force-pushed the refactor-connectivity-netsocket-unittests branch from 28cf6cb to 837045c Compare July 16, 2021 16:02
@hazzlim hazzlim requested a review from rwalton-arm July 16, 2021 16:03
@mergify mergify bot dismissed stale reviews from LDong-Arm, 0xc0170, and rwalton-arm July 16, 2021 16:03

Pull request has been modified.

rwalton-arm
rwalton-arm previously approved these changes Jul 19, 2021
Copy link
Contributor

@rwalton-arm rwalton-arm left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the changes.

Some source files included when building netsocket unit tests with CMake
were determined to be unused by removing the files from target_sources()
and verifying that the tests still built and ran successfully. These
files have been removed from CMake builds.
Some netsocket unit tests depend on nanostack-libservice library, but
should use stubs instead of including the source files. We remove the
source files and link to mbed-stubs-nanostack-libservice.
The CMake target `mbed-headers` brings in all
headers, and we are gradually moving away from it and explicitly use
only headers needed by each unit test.
@hazzlim hazzlim force-pushed the refactor-connectivity-netsocket-unittests branch from 837045c to 14cab32 Compare July 19, 2021 09:40
@mergify mergify bot dismissed rwalton-arm’s stale review July 19, 2021 09:41

Pull request has been modified.

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 19, 2021

CI restarted

@mbed-ci
Copy link

mbed-ci commented Jul 19, 2021

Jenkins CI Test : ✔️ SUCCESS

Build Number: 2 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️

@hazzlim hazzlim requested a review from LDong-Arm July 20, 2021 08:35
@0xc0170 0xc0170 merged commit 146c98c into ARMmbed:master Jul 20, 2021
@mergify mergify bot removed the ready for merge label Jul 20, 2021
@mbedmain mbedmain added release-version: 6.14.0 Release-pending and removed release-type: patch Indentifies a PR as containing just a patch Release-pending labels Aug 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor connectivity netsocket unit tests to use mocks library what it depends
7 participants