Skip to content

Commit

Permalink
Merge branch 'sonic-net:master' into dpu_test_plan_draft_pr
Browse files Browse the repository at this point in the history
  • Loading branch information
nissampa authored Jul 15, 2024
2 parents d02e8d2 + beeeaa5 commit 06cc50a
Show file tree
Hide file tree
Showing 39 changed files with 1,134 additions and 165 deletions.
9 changes: 8 additions & 1 deletion .azure-pipelines/pr_test_scripts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ t0:
- fdb/test_fdb_flush.py
- fdb/test_fdb_mac_expire.py
- fdb/test_fdb_mac_move.py
- fib/test_fib.py
- generic_config_updater/test_aaa.py
- generic_config_updater/test_bgp_speaker.py
- generic_config_updater/test_bgpl.py
Expand All @@ -76,7 +77,10 @@ t0:
- http/test_http_copy.py
- iface_loopback_action/test_iface_loopback_action.py
- iface_namingmode/test_iface_namingmode.py
- ip/test_mgmt_ipv6_only.py
- ip/test_ip_packet.py
- ipfwd/test_dip_sip.py
- ipfwd/test_dir_bcast.py
- lldp/test_lldp.py
- log_fidelity/test_bgp_shutdown.py
- macsec/test_controlplane.py
Expand Down Expand Up @@ -161,6 +165,7 @@ t0:
- tacacs/test_rw_user.py
- telemetry/test_events.py
- telemetry/test_telemetry.py
- telemetry/test_telemetry_cert_rotation.py
- test_features.py
- test_interfaces.py
- test_procdockerstatsd.py
Expand All @@ -171,7 +176,6 @@ t0:
- vlan/test_vlan.py
- vlan/test_vlan_ping.py
- vxlan/test_vnet_route_leak.py
- ip/test_mgmt_ipv6_only.py

t0-2vlans:
- dhcp_relay/test_dhcp_relay.py
Expand Down Expand Up @@ -212,10 +216,12 @@ t1-lag:
- everflow/test_everflow_per_interface.py
- everflow/test_everflow_testbed.py
- fdb/test_fdb_flush.py
- fib/test_fib.py
- generic_config_updater/test_mmu_dynamic_threshold_config_update.py
- golden_config_infra/test_config_reload_with_rendered_golden_config.py
- http/test_http_copy.py
- iface_namingmode/test_iface_namingmode.py
- ip/test_ip_packet.py
- ipfwd/test_dip_sip.py
- ipfwd/test_mtu.py
- lldp/test_lldp.py
Expand Down Expand Up @@ -322,6 +328,7 @@ onboarding_t0:

onboarding_t1:
- decap/test_decap.py
- generic_config_updater/test_cacl.py

onboarding_dualtor:
- dualtor_mgmt/test_dualtor_bgp_update_delay.py
Expand Down
15 changes: 12 additions & 3 deletions .azure-pipelines/pr_test_skip_scripts.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
t0:
# This script only supported on Mellanox
- restapi/test_restapi.py
# KVM do not support drop reason in testcase, and testcase would set drop reason in setup stage, can't do more test
- drop_packets/test_configurable_drop_counters.py
# This script only supported on Mellanox
- generic_config_updater/test_pfcwd_interval.py
# There is no k8s in inventory file
Expand Down Expand Up @@ -39,9 +39,15 @@ t0:
- platform_tests/mellanox/test_hw_management_service.py
- platform_tests/mellanox/test_psu_power_threshold.py
- platform_tests/mellanox/test_reboot_cause.py
# This script only supported on Mellanox
- restapi/test_restapi.py
- snmp/test_snmp_phy_entity.py

t1:
# KVM do not support bfd test
- bfd/test_bfd.py
# KVM do not support drop reason in testcase, and testcase would set drop reason in setup stage, can't do more test
- drop_packets/test_configurable_drop_counters.py
# This script only supported on Mellanox
- generic_config_updater/test_pfcwd_interval.py
# There is no k8s in inventory file
Expand Down Expand Up @@ -84,6 +90,9 @@ t1:
- sub_port_interfaces/test_sub_port_l2_forwarding.py

t2:
# KVM do not support bfd test
- bfd/test_bfd_static_route.py
- bfd/test_bfd_traffic.py
# This script only supported on Mellanox
- generic_config_updater/test_pfcwd_interval.py
# There is no k8s in inventory file
Expand Down Expand Up @@ -142,7 +151,7 @@ tgen:
- ixia/test_ixia_traffic.py
- ixia/test_tgen.py

wan:
wan-pub:
# Currently PR test will not test wan topo
- wan/isis/test_isis_authentication.py
- wan/isis/test_isis_csnp_interval.py
Expand Down
4 changes: 3 additions & 1 deletion .azure-pipelines/testscripts_analyse/analyse_testscripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@


def topo_name_to_type(topo_name):
pattern = re.compile(r'^(wan|t0|t1|ptf|fullmesh|dualtor|t2|tgen|mgmttor|m0|mc0|mx|dpu|any)')
pattern = re.compile(r'^(wan|t0|t1|ptf|fullmesh|dualtor|t2|tgen|multidut-tgen|mgmttor|m0|mc0|mx|dpu|any|snappi)')
match = pattern.match(topo_name)
if match is None:
logging.warning("Unsupported testbed type - {}".format(topo_name))
Expand All @@ -52,6 +52,8 @@ def topo_name_to_type(topo_name):
topo_type = 't0'
if topo_type in ['mc0']:
topo_type = 'm0'
if topo_type in ['multidut-tgen']:
topo_type = 'tgen'
return topo_type


Expand Down
8 changes: 6 additions & 2 deletions .azure-pipelines/testscripts_analyse/constant.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}

# We temporarily set four types of PR checker here
PR_TOPOLOGY_TYPE = ["t0", "t1", "t2", "wan", "dpu"]
PR_TOPOLOGY_TYPE = ["t0", "t1", "t2", "wan", "dpu", "tgen", "snappi", "ptf"]

# Map the topology name and topology type in pr_test_scripts.yaml
# Key is the topology name in pr_test_scripts.yaml and the value is topology type
Expand All @@ -19,5 +19,9 @@
"multi-asic-t1-lag": "t1",
"t2": "t2",
"wan-pub": "wan",
"dpu": "dpu"
"dpu": "dpu",
"tgen": "tgen",
"multidut-tgen": "tgen",
"snappi": "snappi",
"ptf": "ptf"
}
21 changes: 19 additions & 2 deletions ansible/config_sonic_basedon_testbed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -523,9 +523,26 @@
path: /etc/sonic/port_config.json
state: absent

- name: execute cli "config load_minigraph -y" to apply new minigraph
- name: find interface name mapping
port_alias:
hwsku: "{{ hwsku }}"
when: topo == "mx"

- name: Copy dhcp_server config hwsku {{ hwsku }}
copy: src=golden_config_db/dhcp_server_mx.json
dest=/tmp/dhcp_server.json
become: true
shell: config load_minigraph -y
when: topo == "mx"

- name: Generate golden_config_db.json
generate_golden_config_db:
topo_name: "{{ topo }}"
port_index_map: "{{ port_index_map | default({}) }}"
become: true

- name: execute cli "config load_minigraph --override_config -y" to apply new minigraph
become: true
shell: config load_minigraph --override_config -y

- name: Wait for switch to become reachable again
become: false
Expand Down
Loading

0 comments on commit 06cc50a

Please sign in to comment.