Commit 6722117
authored
[parametize by ports] add infrastructure to allow test parametized by ports (#2411)
* [parametize by ports] add infrastructure to allow test parametized by ports
Assumptions:
- Run test_pretest before actual test.
- test_update_testbed_metadata will populate testbed information
and save to tests/metadata/<testbed_name>.json.
Available parameterizes:
- all_ports : all ports available on target testbed.
- oper_up_ports : all ports in oper_up state.
- admin_up_ports : all ports in admin_up state.
- all_pc : all port channel available on target testbed.
- oper_up_pc : all port channel in oper_up state.
- admin_up_pc : all port channel in admin_up state.
Parameter format:
{ 'dut' : <dut name, str>, 'interface' : <port or port channel name, str> }
Expectations:
- when { 'dut' : 'unknown', 'interface' : 'found-no-<port|pc>' } is passed
in as parameter, test should warn and loop through all ports (port channels).
Signed-off-by: Ying Xie <ying.xie@microsoft.com>
* add port channel enumerators
* format json file to be more human readable
* encode/decode dut/port names so the paramters are more informative
* unify encoding for no found cases1 parent 928ebb3 commit 6722117
File tree
5 files changed
+518
-25
lines changed- tests
- common/helpers
- metadata
- platform_tests
5 files changed
+518
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
482 | 483 | | |
483 | 484 | | |
484 | 485 | | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
485 | 533 | | |
486 | 534 | | |
487 | 535 | | |
| |||
493 | 541 | | |
494 | 542 | | |
495 | 543 | | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
0 commit comments