[psud] Increase unit test coverage; Refactor mock platform#154
Merged
jleveque merged 21 commits intosonic-net:masterfrom Mar 29, 2021
jleveque:increase_psud_coverage
Merged
[psud] Increase unit test coverage; Refactor mock platform#154jleveque merged 21 commits intosonic-net:masterfrom jleveque:increase_psud_coverage
jleveque merged 21 commits intosonic-net:masterfrom
jleveque:increase_psud_coverage
Conversation
This comment has been minimized.
This comment has been minimized.
Contributor
Author
|
@mprabhu-nokia: I have done a bit more refactoring to psud in order to increase unit test coverage. Can you please test and review these changes on a modular chassis? Update: Please wait on testing and reviewing these changes until the sonic-platform-common PR merges and I get the check builds passing. I will notify you again at that point. |
This comment has been minimized.
This comment has been minimized.
Contributor
Author
|
Unit test is failing due to a bug uncovered in sonic_platform_base. |
added 19 commits
March 17, 2021 23:26
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Contributor
Author
|
@mprabhu-nokia: Can you please review and test this PR? |
1 similar comment
Contributor
Author
|
@mprabhu-nokia: Can you please review and test this PR? |
4 tasks
lguohan
pushed a commit
to sonic-net/sonic-buildimage
that referenced
this pull request
Mar 30, 2021
Unit tests for psud depend on sonic-platform-common as of sonic-net/sonic-platform-daemons#154
Merged
4 tasks
daall
pushed a commit
to sonic-net/sonic-buildimage
that referenced
this pull request
Mar 31, 2021
Unit tests for psud depend on sonic-platform-common as of sonic-net/sonic-platform-daemons#154
raphaelt-nvidia
pushed a commit
to raphaelt-nvidia/sonic-buildimage
that referenced
this pull request
May 23, 2021
Unit tests for psud depend on sonic-platform-common as of sonic-net/sonic-platform-daemons#154
carl-nokia
pushed a commit
to carl-nokia/sonic-buildimage
that referenced
this pull request
Aug 7, 2021
Unit tests for psud depend on sonic-platform-common as of sonic-net/sonic-platform-daemons#154
vdahiya12
pushed a commit
to vdahiya12/sonic-platform-daemons
that referenced
this pull request
Apr 4, 2022
When build python3 xcvrd, it tries to do basic check which will import this y_cable.py. However, not all platform supports python3 API now, so it could cause an issue when importing sonic_platform.platform We skip the ImportError here to make the builder happy. And this is safe because: - If any python package is not available, there will be exception when use it - Vendors know their platform API version, they are responsible to use correct python version when importing this file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
run()method does not contain an infinite loop, thus allowing us to unit test itPSUD_UNIT_TESTINGenvironment variable in daemon codePrevious unit test coverage:
Unit test coverage with this patch:
Motivation and Context
To increase unit test coverage >= 90% in order to prevent regressions
How Has This Been Tested?
The refactored psud has been tested on a physical DUT and the unit test results can be examined via the Azure Pipelines check builds in this PR.