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

[sonic-pit] Add PIT(Platform Integration Test) feature, first commit … #12514

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

clarklee-guizhao
Copy link
Contributor

…with only framework and 2 test cases with 1 supportting platform.

Signed-off-by: Li Hua guizhao.lh@alibaba-inc.com

Why I did it

sonic-pit is originated from S3IP(Simplify Switch System Integration Program) PIT(Platform Integration Test). It's designed to verify switch devices in the process of development, manufacturing and delivering stages. It focus on 2 roles: ODM and user. ODM may use PIT in developing and manufaturing stages, user may use PIT in delivery stage for acceptance test. It aims to provide an verify system for siwtch devices' hardware, drivers and firmware. More information, see HLD: https://github.com/clarklee-guizhao/SONiC/blob/pit/doc/pit/Platform_Integration_Test_high_level_design.md

How I did it

Porting sonic-pit from S3IP-PIT, make the original code clean enough, add PIT source as sonic-pit, add PIT running environment as docker-pit.
The whole PIT system is divided into several PR, this is the first PR with PIT framework and 2 test cases with 1 supporting platform only.

How to verify it

Copy sonic_pit-1.0-py3-none-any.whl to your device running sonic, install it with pip install sonic_pit-1.0-py3-none-any.whl, then run '/usr/local/pit-sysdiag/src/sysdiag -d' to start test.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205

Description for the changelog

Add PIT, whihc include sonic-pit(the PIT system) and docker-pit(the running environment for sonic-pit).

Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

…with only framework and 2 test cases with 1 supportting platform.

Signed-off-by: Li Hua <guizhao.lh@alibaba-inc.com>
Signed-off-by: Li Hua <guizhao.lh@alibaba-inc.com>
@lgtm-com
Copy link

lgtm-com bot commented Oct 26, 2022

This pull request introduces 5 alerts when merging 5ce634f into 3058fb6 - view on LGTM.com

new alerts:

  • 2 for Unused import
  • 2 for 'import *' may pollute namespace
  • 1 for Unused local variable

@clarklee-guizhao
Copy link
Contributor Author

/azpw run Azure.sonic-buildimage

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@clarklee-guizhao
Copy link
Contributor Author

sonic-net/SONiC#1014

@clarklee-guizhao
Copy link
Contributor Author

@lguohan @qiluo-msft @xumia Hi forks, please help review the PIT first code PR, with basic framework and 2 test case supporting 1 platform(alibaba-as14-40d). This is standalone runnable test to show how pit works. Please feel free to send me feedback if any. Thanks a lot.

rules/sonic-pit.mk Show resolved Hide resolved
src/sonic-pit/pit-sysdiag/README.md Outdated Show resolved Hide resolved
src/sonic-pit/pit-sysdiag/README.md Outdated Show resolved Hide resolved
src/sonic-pit/pit-sysdiag/src/errcode.py Outdated Show resolved Hide resolved
src/sonic-pit/pit-sysdiag/src/fan_tc.py Outdated Show resolved Hide resolved
src/sonic-pit/pit-sysdiag/src/function.py Outdated Show resolved Hide resolved
src/sonic-pit/pit-sysdiag/src/function.py Show resolved Hide resolved
src/sonic-pit/pit-sysdiag/src/psu_tc.py Outdated Show resolved Hide resolved
src/sonic-pit/pit-sysdiag/src/syslogger.py Show resolved Hide resolved
src/sonic-pit/pit-sysdiag/src/pit_util_common.py Outdated Show resolved Hide resolved
src/sonic-pit/pit-sysdiag/src/function.py Outdated Show resolved Hide resolved
src/sonic-pit/pit-sysdiag/src/function.py Outdated Show resolved Hide resolved
keboliu
keboliu previously approved these changes Feb 17, 2023
@zhangyanzhao
Copy link
Collaborator

@clarklee-guizhao can you please check and fix the build failure? Thanks.

Signed-off-by: Clark Lee <guizhao.lh@alibaba-inc.com>
@clarklee-guizhao
Copy link
Contributor Author

@clarklee-guizhao can you please check and fix the build failure? Thanks.

Yanzhao, I've fix the 'semgrep' tool warnings for python security reason in the latest commit.

@clarklee-guizhao
Copy link
Contributor Author

I Solved the conflict introduced by merging latest commits, please help review this PR again, thanks a lot. @keboliu

@clarklee-guizhao
Copy link
Contributor Author

@lguohan , I've sync up this branch with master, please help check if there's anything to improve or we can merge this into master, thanks a lot.

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