summaryrefslogtreecommitdiffstats
path: root/scripts/automation/regression/unit_tests/trex_imix_test.py
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-01-08 14:40:31 +0200
committerYaroslav Brustinov <ybrustin@cisco.com>2016-01-08 14:40:31 +0200
commit148fd251911869db33df03f7fd3287c1f76f2fa4 (patch)
treedf3f8b848c57d701dd71255f9949927eaff32b6e /scripts/automation/regression/unit_tests/trex_imix_test.py
parent8db09096b9dcf030b7dc744fbd7ee463d8e6fd1b (diff)
building: add pkg option with --pkg-dir and --pkg-file arguments (./b pkg --pkg-dir ...) for building TRex package
regression: add jumbo packets test high latency fails test and not only print add maximal and minimal expected CPU utilization aggregate results: remove tracebacks at usual errors in tests move TRex info from setups info to top (its now common to all setups) save last good commit hash
Diffstat (limited to 'scripts/automation/regression/unit_tests/trex_imix_test.py')
-rwxr-xr-xscripts/automation/regression/unit_tests/trex_imix_test.py31
1 files changed, 29 insertions, 2 deletions
diff --git a/scripts/automation/regression/unit_tests/trex_imix_test.py b/scripts/automation/regression/unit_tests/trex_imix_test.py
index b56f7f4e..9e772fa7 100755
--- a/scripts/automation/regression/unit_tests/trex_imix_test.py
+++ b/scripts/automation/regression/unit_tests/trex_imix_test.py
@@ -1,10 +1,9 @@
-
#!/router/bin/python
from trex_general_test import CTRexGeneral_Test
from CPlatform import CStaticRouteConfig
from tests_exceptions import *
#import sys
-import time;
+import time
class CTRexIMIX_Test(CTRexGeneral_Test):
"""This class defines the IMIX testcase of the T-Rex traffic generator"""
@@ -167,6 +166,34 @@ class CTRexIMIX_Test(CTRexGeneral_Test):
self.check_CPU_benchmark(trex_res, 10)
+
+ def test_jumbo(self):
+ if not self.is_loopback:
+ self.router.configure_basic_interfaces()
+ self.router.config_pbr(mode = "config")
+
+ mult = self.get_benchmark_param('multiplier')
+ core = self.get_benchmark_param('cores')
+
+ ret = self.trex.start_trex(
+ c = core,
+ m = mult,
+ p = True,
+ nc = True,
+ d = 100,
+ f = 'cap2/imix_9k.yaml',
+ l = 1000)
+
+ trex_res = self.trex.sample_to_run_finish()
+
+ # trex_res is a CTRexResults instance- and contains the summary of the test results
+ # you may see all the results keys by simply calling here for 'print trex_res.result'
+ print ("\nLATEST RESULT OBJECT:")
+ print trex_res
+
+ self.check_general_scenario_results(trex_res)
+ self.check_CPU_benchmark(trex_res, minimal_cpu = 0, maximal_cpu = 10)
+
def tearDown(self):
CTRexGeneral_Test.tearDown(self)
# remove nbar config here