[dts] [Patch V1] framework/tester.py : add this function to support ixia to send fixed number of packets during certain period it is only for test_suite nic_single_core_perf, not for common use

wang fei feix.y.wang at intel.com
Wed Sep 20 14:31:15 CEST 2017


Signed-off-by: wang fei <feix.y.wang at intel.com>
---
 framework/tester.py | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/framework/tester.py b/framework/tester.py
index e7fb6bc..78202d0 100644
--- a/framework/tester.py
+++ b/framework/tester.py
@@ -491,6 +491,17 @@ class Tester(Crb):
 
         return out.rpartition('[')[0]
 
+    def traffic_generator_send_packets(self,portList,ratePercent,packetNum,delay=5,runTime=60):
+        """
+        send fixed number of packets on specified ports during runTime time.
+        Be note that this function is only used for nic_single_core_perf test case, not for common use
+        """
+        if self.check_port_list(portList, 'ixia'):
+            return self.ixia_packet_gen.send_packets(portList, ratePercent, packetNum,delay,runTime)
+        if not self.check_port_list(portList):
+            self.logger.warning("exception by mixed port types")
+            return None
+
     def traffic_generator_throughput(self, portList, rate_percent=100, delay=5):
         """
         Run throughput performance test on specified ports.
-- 
2.7.4



More information about the dts mailing list