Skip to content

Conversation

@ZhaohuiS
Copy link
Contributor

@ZhaohuiS ZhaohuiS commented Dec 4, 2025

Description of PR

Summary:
Fixes # (issue)
If we want to enable post sanity check, we have to run pre sanity check for now, it's impossible to disable pre sanity check and enable post sanity check in current code.
Add a new option of skip pre sanity check to achieve the goal of disabling pre sanity check and enable post sanity check at same time, which is moving sanity check after test running.

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202205
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511

Approach

What is the motivation for this PR?

Add a new option of skip pre sanity check to achieve the goal of disabling pre sanity check and enable post sanity check at same time, which is moving sanity check after test running.

How did you do it?

Add a new pytest option --skip_pre_sanity.

How did you verify/test it?

run test case with this new option.

04/12/2025 07:13:49 __init__.sanity_check_full               L0210 INFO   | Prepare sanity check
04/12/2025 07:13:49 __init__.sanity_check_full               L0227 INFO   | Found marker: m.name=topology, m.args=('t0', 'm0', 'mx', 't0-2vlans'), m.kwargs={}
04/12/2025 07:13:49 __init__.sanity_check_full               L0300 INFO   | Sanity check settings: skip_sanity=False, skip_pre_sanity=True, pre_check_items=['check_processes', 'check_interfaces', 'check_bgp', 'check_dbmemory', 'check_monit', 'check_secureboot', 'check_ipv4_mgmt', 'check_ipv6_mgmt', 'check_orchagent_usage'], allow_recover=False, recover_method=adaptive, post_check=True, post_check_items=['check_processes', 'check_interfaces', 'check_bgp', 'check_dbmemory', 'check_monit', 'check_secureboot', 'check_ipv4_mgmt', 'check_ipv6_mgmt', 'check_orchagent_usage']
04/12/2025 07:13:49 __init__.sanity_check_full               L0340 INFO   | No pre-test sanity check item, skip pre-test sanity check.

Any platform specific information?

all platforms.

Supported testbed topology if it's a new test case?

Documentation

Signed-off-by: Zhaohui Sun <[email protected]>
@ZhaohuiS ZhaohuiS requested review from a team and wangxin as code owners December 4, 2025 07:22
@mssonicbld
Copy link
Collaborator

/azp run

@ZhaohuiS ZhaohuiS changed the title Add the option of skip pre sanity check Add the option of skip pre sanity check --skip_pre_sanity Dec 4, 2025
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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.

3 participants