summaryrefslogtreecommitdiffstats
path: root/scripts/automation/regression/stateless_tests
diff options
context:
space:
mode:
authorIdo Barnea <ibarnea@cisco.com>2016-03-27 18:21:19 +0300
committerIdo Barnea <ibarnea@cisco.com>2016-03-27 18:21:19 +0300
commitfbf1d1f4387566e964b2775e79e4e71c87dc3f8d (patch)
tree15f917a85afab267b7ff92cd58a503f33740bf14 /scripts/automation/regression/stateless_tests
parent4e5179ce8df77d7f4521639eead532222d31ea30 (diff)
Make flow stats test run on 10g/1g and vm in low rate
Diffstat (limited to 'scripts/automation/regression/stateless_tests')
-rw-r--r--scripts/automation/regression/stateless_tests/stl_rx_test.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/scripts/automation/regression/stateless_tests/stl_rx_test.py b/scripts/automation/regression/stateless_tests/stl_rx_test.py
index 90082c59..49c53855 100644
--- a/scripts/automation/regression/stateless_tests/stl_rx_test.py
+++ b/scripts/automation/regression/stateless_tests/stl_rx_test.py
@@ -14,11 +14,17 @@ class STLRX_Test(CStlGeneral_Test):
self.tx_port, self.rx_port = CTRexScenario.stl_ports_map['bi'][0]
- cap = self.c.get_port_info(ports = self.rx_port)[0]['rx']['caps']
+ port_info = self.c.get_port_info(ports = self.rx_port)[0]
+ cap = port_info['rx']['caps']
if cap != 1:
self.skip('port {0} does not support RX'.format(self.rx_port))
-
+ if port_info['speed'] == 40:
+ self.rate_percent = 80
+ self.total_pkts = 50000
+ else:
+ self.rate_percent = 1
+ self.total_pkts = 10
self.c.reset(ports = [self.tx_port, self.rx_port])
self.pkt = STLPktBuilder(pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)/IP()/'a_payload_example')
@@ -68,14 +74,14 @@ class STLRX_Test(CStlGeneral_Test):
# one simple stream on TX --> RX
def test_one_stream(self):
- total_pkts = 500000
+ total_pkts = self.total_pkts * 10
try:
s1 = STLStream(name = 'rx',
packet = self.pkt,
flow_stats = STLFlowStats(pg_id = 5),
mode = STLTXSingleBurst(total_pkts = total_pkts,
- percentage = 80
+ percentage = self.rate_percent
))
# add both streams to ports
@@ -94,7 +100,7 @@ class STLRX_Test(CStlGeneral_Test):
# one simple stream on TX --> RX
def test_multiple_streams(self):
- total_pkts = 500000
+ total_pkts = self.total_pkts * 10
try:
streams = []
@@ -120,14 +126,14 @@ class STLRX_Test(CStlGeneral_Test):
assert False , '{0}'.format(e)
def test_1_stream_many_iterations (self):
- total_pkts = 50000
+ total_pkts = self.total_pkts
try:
s1 = STLStream(name = 'rx',
packet = self.pkt,
flow_stats = STLFlowStats(pg_id = 5),
mode = STLTXSingleBurst(total_pkts = total_pkts,
- percentage = 80
+ percentage = self.rate_percent
))
# add both streams to ports