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

Increase UT coverage #446

Merged
merged 26 commits into from
May 7, 2024
Merged

Increase UT coverage #446

merged 26 commits into from
May 7, 2024

Conversation

disa6302
Copy link
Contributor

@disa6302 disa6302 commented Apr 11, 2024

Issue #, if available:

What was changed?

  • Removed samples and jsmn from coverage report
  • Added new unit tests for LWS, Curl, AwsV4Signer and IoT paths
  • Fixed typos in the code that were caught while adding new unit tests
  • Using lcov instead of gcov to allow for better filters in coverage reports (for our purpose, remove jsmn.h from report).

Why was it changed?

  • To ensure existing APIs were tested via unit tests
  • To report the appropriate coverage provided by the unit tests

How was it changed?

  • Increased test suite
  • Moved to lcov to allow for better filtering in the future.
  • Increased coverage from 64.24% to 90.81%

What testing was done for the changes?

  • Ran existing and new unit tests

Future changes:

  • Include LWS build on Mac (currently, there are some globals defined in PIC that causes our unit tests to fail when building LWS and CURL at the same time)
  • Include IoT tests in Windows (currently, there is an issue on windows where the SDK cannot open the cert file even if it exists, needs dedicated investigation).

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov-commenter
Copy link

codecov-commenter commented Apr 11, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 90.80%. Comparing base (7f9ff95) to head (1f55db7).
Report is 1 commits behind head on develop.

❗ Current head 1f55db7 differs from pull request most recent head 346c5b7. Consider uploading reports for the commit 346c5b7 to get more accurate results

Files Patch % Lines
src/source/CallbacksProvider.c 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           develop     #446       +/-   ##
============================================
+ Coverage    63.93%   90.80%   +26.86%     
============================================
  Files           32       28        -4     
  Lines         5077     4894      -183     
============================================
+ Hits          3246     4444     +1198     
+ Misses        1831      450     -1381     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@disa6302 disa6302 marked this pull request as ready for review April 12, 2024 01:16
@hassanctech hassanctech self-requested a review April 12, 2024 15:55
hassanctech
hassanctech previously approved these changes May 1, 2024
Copy link
Contributor

@hassanctech hassanctech left a comment

Choose a reason for hiding this comment

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

LGTM

hassanctech
hassanctech previously approved these changes May 1, 2024
Copy link
Contributor

@hassanctech hassanctech left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@niyatim23 niyatim23 left a comment

Choose a reason for hiding this comment

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

Great work!

Copy link
Contributor

@hassanctech hassanctech left a comment

Choose a reason for hiding this comment

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

lgtm

@disa6302 disa6302 merged commit eabf283 into develop May 7, 2024
19 checks passed
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