Add script platform_tests/test_platform_info.py into T0 PR checker.#13353
Conversation
83d2930 to
80e7d89
Compare
| healthy_psus = 0 | ||
| psuutil_status_output = duthost.command(PSUUTIL_CMD) | ||
| psuutil_status_output = duthost.command(PSUUTIL_CMD, module_ignore_errors=True) | ||
| if psuutil_status_output['rc'] != 0: |
There was a problem hiding this comment.
@yutongzhang-microsoft if rc !=0, is there any possibility that the command doesn't work or is something wrong on physical testbed? If so, how to handle this scenario?
There was a problem hiding this comment.
I will add another condition here, duthost.facts["asic_type"] == "vs"
| if dut.facts["asic_type"] == "vs" and output["rc"] == 0: | ||
| pytest.skip("Thermalctld doesn't support on vs testbed") | ||
| else: | ||
| assert output["rc"] == 0, "Run command '%s' failed" % find_thermalctld_pid_cmd |
There was a problem hiding this comment.
@yutongzhang-microsoft if you prefer to use format() to concentrate string, do you mind keeping using a same format for whole script?
There was a problem hiding this comment.
Sure, I will keep the same format in this script
wangxin
left a comment
There was a problem hiding this comment.
Maybe the better idea is to expect different rc and output when DUT is vs setup.
Use pytest.skip here does not make sense.
If there is no point running the platform related commands at all, then add device_type "vs" mark is a better idea.
Hi, Xin, some part of the test such as running a command is worth to be tested as we discussed offline. So I use return instead of skip, to execute to left part. |
test_platform_info.py into T0 PR checker.
test_platform_info.py into T0 PR checker.platform_tests/test_platform_info.py into T0 PR checker.
|
@yutongzhang-microsoft Do we need to cherry-pick this to 202311 and 202405? |
These changes are aimed at fitting vs testbed, will have no influence on physical. You can cherry pick if you need. |
Description of PR
In PR #13220, we add a batch of control plane test scripts into onboarding T0 PR checker, but some of them failed. In this PR, we fix the failed test script
platform_tests/test_platform_info.pyand let it run successfully in T0 PR checker.Summary:
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
In PR #13220, we add a batch of control plane test scripts into onboarding T0 PR checker, but some of them failed. In this PR, we fix the failed test script
platform_tests/test_platform_info.pyand let it run successfully in T0 PR checker.How did you do it?
How did you verify/test it?
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation