Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions ansible/roles/test/tasks/snmp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,28 @@
assert: { that: "ansible_sysname == '{{ inventory_hostname }}'" }

- block:
- name: include snmp cpu test
include: roles/test/tasks/snmp/cpu.yml

- name: inlcude snmp physical table test
include: roles/test/tasks/snmp/phys_table.yml

- name: include snmp interfaces test
include: roles/test/tasks/snmp/interfaces.yml

- name: include snmp pfc counter test
include: roles/test/tasks/snmp/pfc_counters.yml

- name: include snmp queues test
include: roles/test/tasks/snmp/queues.yml

- name: include snmp PSU test
include: roles/test/tasks/snmp/psu.yml
include: roles/test/tasks/snmp/queues.yml

- name: include snmp lldp test
include: roles/test/tasks/snmp/lldp.yml
when: testcase_name is defined

- block:
- name: include snmp cpu test
include: roles/test/tasks/snmp/cpu.yml
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.

why cpu test is not available in simx?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

the tests seems not to working mostly does not look that it does what it aims to do
More investigation is required and will be done regardless of this PR.


- name: inlcude snmp physical table test
include: roles/test/tasks/snmp/phys_table.yml

- name: include snmp PSU test
include: roles/test/tasks/snmp/psu.yml
when:
- testcase_name is defined
- hostvars[ansible_hostname]['type'] != 'simx'
21 changes: 21 additions & 0 deletions ansible/roles/test/tasks/test_sonic_by_testname.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,38 @@
- name: print system versions
debug: var=versions.stdout_lines

- set_fact:
skip_test: false

- set_fact:
skip_test: true
when:
- testcases[testcase_name]['vtestbed_compatible'] is defined
- hostvars[ansible_hostname]['type'] == 'kvm' or hostvars[ansible_hostname]['type'] == 'simx'
- not testcases[testcase_name]['vtestbed_compatible'] | bool

- name: run test case {{ testcases[testcase_name]['filename'] }} file
include: "{{ testcases[testcase_name]['filename'] }}"
when: not skip_test

- name: do basic sanity check after each test
include: base_sanity.yml
when: not skip_test

- name: validate all interfaces are up after test
include: interface.yml
when: not skip_test

- debug:
msg:
- "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
- "!!!!!!!!!!!!!!!!!!!! test {{ testcase_name }} was skipped !!!!!!!!!!!!!!!!!!!!!!"
- "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
when: skip_test

- debug:
msg:
- "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
- "!!!!!!!!!!!!!!!!!!!! end running test {{ testcase_name }} !!!!!!!!!!!!!!!!!!!!!!"
- "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
when: not skip_test
14 changes: 14 additions & 0 deletions ansible/roles/test/vars/testcases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ testcases:

continuous_reboot:
filename: continuous_reboot.yml
vtestbed_compatible: no
topologies: [t0, t0-52, t0-56, t0-64, t0-64-32, t0-116, t1, t1-lag, t1-64-lag]

copp:
Expand Down Expand Up @@ -75,27 +76,31 @@ testcases:

fast-reboot:
filename: fast-reboot.yml
vtestbed_compatible: no
topologies: [t0, t0-56, t0-64, t0-64-32, t0-116]
required_vars:
ptf_host:
vm_hosts:

warm-reboot:
filename: warm-reboot.yml
vtestbed_compatible: no
topologies: [t0, t0-64, t0-64-32, t0-116]
required_vars:
ptf_host:
vm_hosts:

warm-reboot-sad:
filename: warm-reboot-sad.yml
vtestbed_compatible: no
topologies: [t0, t0-64, t0-64-32, t0-116]
required_vars:
ptf_host:
vm_hosts:

warm-reboot-multi-sad:
filename: warm-reboot-multi-sad.yml
vtestbed_compatible: no
topologies: [t0, t0-64, t0-64-32, t0-116]
required_vars:
ptf_host:
Expand All @@ -117,6 +122,7 @@ testcases:

warm-reboot-fib:
filename: warm-reboot-fib.yml
vtestbed_compatible: no
topologies: [t0, t0-16, t0-64, t0-64-32, t0-116, t1, t1-lag, t1-64-lag]
required_vars:
ptf_host:
Expand Down Expand Up @@ -157,10 +163,12 @@ testcases:

link_flap:
filename: link_flap.yml
vtestbed_compatible: no
topologies: [t0, t0-16, t0-52, t0-56, t0-64, t0-64-32, t0-116, t1, t1-lag, t1-64-lag, ptf32, ptf64]

continuous_link_flap:
filename: continuous_link_flap.yml
vtestbed_compatible: no
topologies: [t0, t0-16, t0-64, t0-64-32, t0-116, t1, t1-lag, t1-64-lag]

mem_check:
Expand Down Expand Up @@ -190,6 +198,7 @@ testcases:

pfc_wd:
filename: pfc_wd.yml
vtestbed_compatible: no
topologies: [t0, t0-56, t0-64, t0-64-32, t0-116, t1, t1-lag, t1-64-lag, ptf32, ptf64]

portstat:
Expand All @@ -198,6 +207,7 @@ testcases:

port_toggle:
filename: port_toggle.yml
vtestbed_compatible: no
topologies: [t0, t0-64, t0-64-32, t0-116, t1, t1-lag, t1-64-lag, ptf32, ptf64]

qos:
Expand Down Expand Up @@ -230,6 +240,7 @@ testcases:

sensors:
filename: sensors_check.yml
vtestbed_compatible: no
topologies: [t0, t0-52, t0-56, t0-64, t0-64-32, t0-116, t1, t1-lag, t1-64-lag, ptf32, ptf64]

service_acl:
Expand Down Expand Up @@ -264,18 +275,21 @@ testcases:

vxlan_decap:
filename: vxlan-decap.yml
vtestbed_compatible: no
topologies: [t0, t0-16, t0-52, t0-56, t0-64, t0-64-32, t0-116]
required_vars:
ptf_host:

wr_arp:
filename: wr_arp.yml
vtestbed_compatible: no
topologies: [t0, t0-16, t0-52, t0-56, t0-64, t0-64-32, t0-116]
required_vars:
ptf_host:

vnet_vxlan:
filename: vnet_vxlan.yml
vtestbed_compatible: no
topologies: [t0, t0-16, t0-52, t0-56, t0-64, t0-64-32, t0-116]
required_vars:
ptf_host:
Expand Down
7 changes: 7 additions & 0 deletions tests/platform/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import pytest

@pytest.fixture(autouse=True, scope="module")
def skip_on_simx(testbed_devices):
platform = testbed_devices["dut"].facts["platform"]
if "simx" in platform:
pytest.skip('skipped on this platform: {}'.format(platform))