Skip to content

made possible to skip one of 2 similar warmboot test cases#7280

Open
antonptashnik wants to merge 1 commit intosonic-net:masterfrom
antonptashnik:skip-duplicated-warmboot-tests
Open

made possible to skip one of 2 similar warmboot test cases#7280
antonptashnik wants to merge 1 commit intosonic-net:masterfrom
antonptashnik:skip-duplicated-warmboot-tests

Conversation

@antonptashnik
Copy link
Copy Markdown
Contributor

Description of PR

Summary: made possible to skip one of 2 similar warmboot test cases
Fixes # (issue)

There are 2 warm-reboot TC sets for test_warm_reboot_sad among others: sad and multi-sad.
Such a suite sets port/lag oper/admin state down before reboot and verifies its still down after reboot. The only difference between sad and multi_sad suites is the number of ports selected for the scenario - "sad" selects 1 port only while "multi_sad" selects 2-3.

To reduce test exec time we can skip just "sad" suite and run "multi_sad" suite only as it covers same scenario with more ports checked. Introduced corresponding flags that allow skipping sad/multi_sad test suite - "single_sad_only" and "multi_sad_only".

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911
  • 202012
  • 202205

Approach

What is the motivation for this PR?

Allow one to reduce advanced tests exec time by skipping one of similar test suites

How did you do it?

Introduced flags for skipping a desired test

How did you verify/test it?

pytest platform_tests/test_advanced_reboot.py -k test_warm_reboot_sad --multi_sad_only
pytest platform_tests/test_advanced_reboot.py -k test_warm_reboot_sad --single_sad_only

Any platform specific information?

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

Documentation

@antonptashnik
Copy link
Copy Markdown
Contributor Author

@ZhaohuiS take a look please. Thanks in advance!

parser.addoption(
"--multi_sad_only",
action="store_true",
default=False
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should set multi_sad_only default value to True?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left it as it is to avoid unexpected skips for others. Vendor needs decide himself and skip one of the suites explicitly
using any proposed flag, if he wants to, passing the corresponding flag at test run

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