summaryrefslogtreecommitdiffstats
path: root/scripts/automation/regression/stateless_tests/stl_client_test.py
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-04-04 14:30:07 +0300
committerimarom <imarom@cisco.com>2016-04-10 12:37:18 +0300
commit1d62dfca8a6c7a3a54c8c08ef1a1332582ba38cb (patch)
tree9ebb45e94ce2d155269ebb18306692a4a7b11e31 /scripts/automation/regression/stateless_tests/stl_client_test.py
parent9ade0a9af71faa83ad26291a7f5c13733d2e66ec (diff)
activate client tests on all setups with restrictions
Diffstat (limited to 'scripts/automation/regression/stateless_tests/stl_client_test.py')
-rw-r--r--scripts/automation/regression/stateless_tests/stl_client_test.py26
1 files changed, 16 insertions, 10 deletions
diff --git a/scripts/automation/regression/stateless_tests/stl_client_test.py b/scripts/automation/regression/stateless_tests/stl_client_test.py
index 01a90250..3ef4713f 100644
--- a/scripts/automation/regression/stateless_tests/stl_client_test.py
+++ b/scripts/automation/regression/stateless_tests/stl_client_test.py
@@ -240,22 +240,29 @@ class STLClient_Test(CStlGeneral_Test):
def test_all_profiles (self):
- # need promiscious for this one...
- if self.is_virt_nics or not self.is_loopback:
- self.skip('skipping profile tests for virtual NICs')
- return
try:
- self.c.set_port_attr(ports = [self.tx_port, self.rx_port], promiscuous = True)
-
+
for profile in self.profiles:
+
print("now testing profile {0}...\n").format(profile)
p1 = STLProfile.load(profile, port_id = self.tx_port)
p2 = STLProfile.load(profile, port_id = self.rx_port)
+ # if profile contains custom MAC addrs we need promiscuous mode
+ # but virtual NICs does not support promiscuous mode
+ self.c.set_port_attr(ports = [self.tx_port, self.rx_port], promiscuous = False)
+
+ if p1.has_custom_mac_addr():
+ if not self.is_virt_nics:
+ self.c.set_port_attr(ports = [self.tx_port, self.rx_port], promiscuous = True)
+ else:
+ print("\n*** profile needs promiscuous mode but running on virtual NICs - skipping... ***\n")
+ continue
+
if p1.has_flow_stats():
- print("profile needs RX caps - skipping...")
+ print("\n*** profile needs RX caps - skipping... ***\n")
continue
self.c.add_streams(p1, ports = self.tx_port)
@@ -280,9 +287,8 @@ class STLClient_Test(CStlGeneral_Test):
assert self.tx_port in stats, '{0} - no stats for TX port'.format(profile)
assert self.rx_port in stats, '{0} - no stats for RX port'.format(profile)
- assert stats[self.tx_port]['opackets'] == stats[self.rx_port]['ipackets'], '{0} - number of TX packets differ from RX packets'.format(profile)
-
- assert stats[self.rx_port]['opackets'] == stats[self.tx_port]['ipackets'], '{0} - number of TX packets differ from RX packets'.format(profile)
+ self.verify(stats[self.tx_port]['opackets'], stats[self.rx_port]['ipackets'])
+ self.verify(stats[self.rx_port]['opackets'], stats[self.tx_port]['ipackets'])
self.c.remove_all_streams(ports = [self.tx_port, self.rx_port])