Convert tests test_cpu_memory_usage, test_port_toggle to support T2 c… #3117
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 of PR
Summary:
Fixes # (issue)
Type of change
Approach
What is the motivation for this PR?
Add new attribute modular_chassis which will be set true if DUT is modular chassis and False for other
Add support to run tests on tests/platform_tests/test_cpu_memory_usage.py, tests/platform_tests/test_port_toggle.py on T2 chassis, change test_show_chassis_module to run duts per hwsku.
Add new tests to verify thermal local and global state db on VoQ chassis introduced by PRs sonic-net/sonic-swss-common#395 and sonic-net/sonic-platform-daemons#101
How did you do it?
modifications to current tests and new test file as below:
tests/common/devices/sonic.py
Add new attribute modular_chassis which can be used to skip tests only for modular chassis if DUT is not chassis
possible values for attribute are True if DUT is part of modular chassis and False if not part of modular chassis
tests/platform_tests/cli/test_show_chassis_module.py
tests/platform_tests/test_cpu_memory_usage.py
tests/platform_tests/test_port_toggle.py
tests/platform_tests/test_thermal_state_db.py
How did you verify/test it?
Validated the modified tests against a chassis .
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation