summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-01-12 10:10:10 +0200
committerYaroslav Brustinov <ybrustin@cisco.com>2016-01-12 10:10:10 +0200
commit0f49e42f202491f7d8e23be237f9c94f136fe384 (patch)
treeda48cb2bbff731f1b1963ab1bd31ed4d1cfeaf8a /scripts
parentd7270bba3a4f8b89314abf82e21346fc81d6a6df (diff)
regression:
add jumbo benchmark for trex08 replace --local for --functional flag, remove the need of SETUP_DIR in such case
Diffstat (limited to 'scripts')
-rw-r--r--scripts/automation/regression/setups/trex08/benchmark.yaml6
-rwxr-xr-xscripts/automation/regression/trex_unit_test.py24
-rwxr-xr-xscripts/automation/regression/unit_tests/trex_imix_test.py21
3 files changed, 28 insertions, 23 deletions
diff --git a/scripts/automation/regression/setups/trex08/benchmark.yaml b/scripts/automation/regression/setups/trex08/benchmark.yaml
index e821149d..d4bb8283 100644
--- a/scripts/automation/regression/setups/trex08/benchmark.yaml
+++ b/scripts/automation/regression/setups/trex08/benchmark.yaml
@@ -52,4 +52,8 @@ test_rx_check_http:
test_rx_check_http_ipv6_disabled:
multiplier : 99000
cores : 3
- rx_sample_rate : 128 \ No newline at end of file
+ rx_sample_rate : 128
+
+test_jumbo:
+ multiplier : 150
+ cores : 2 \ No newline at end of file
diff --git a/scripts/automation/regression/trex_unit_test.py b/scripts/automation/regression/trex_unit_test.py
index 6abeaab7..2995875c 100755
--- a/scripts/automation/regression/trex_unit_test.py
+++ b/scripts/automation/regression/trex_unit_test.py
@@ -113,12 +113,14 @@ class CTRexTestConfiguringPlugin(Plugin):
parser.add_option('--kill-running', '--kill_running', action="store_true", default = False,
dest="kill_running",
help="Kills running TRex process on remote server (useful for regression).")
-
- parser.add_option('--local', action="store_true", default = False,
- dest="local",
- help="Don't connect to remote server for runnning daemon (useful for functional tests).")
+ parser.add_option('--functional', action="store_true", default = False,
+ dest="functional",
+ help="Don't connect to remote server for runnning daemon (For functional tests).")
def configure(self, options, conf):
+ self.functional = options.functional
+ if self.functional:
+ return
if CTRexScenario.setup_dir and options.config_path:
raise Exception('Please either define --cfg or use env. variable SETUP_DIR, not both.')
if not options.config_path and CTRexScenario.setup_dir:
@@ -135,12 +137,12 @@ class CTRexTestConfiguringPlugin(Plugin):
self.verbose_mode = options.verbose_mode
self.clean_config = False if options.skip_clean_config else True
self.server_logs = options.server_logs
- self.local = options.local
-
if options.log_path:
self.loggerPath = options.log_path
def begin (self):
+ if self.functional:
+ return
# initialize CTRexScenario global testing class, to be used by all tests
CTRexScenario.configuration = self.configuration
CTRexScenario.benchmark = self.benchmark
@@ -148,9 +150,8 @@ class CTRexTestConfiguringPlugin(Plugin):
CTRexScenario.server_logs = self.server_logs
# launch TRex daemon on relevant setup
- if not self.local:
- start_trex_remote_server(self.configuration.trex, self.kill_running)
- CTRexScenario.trex = CTRexClient(trex_host = self.configuration.trex['trex_name'], verbose = self.verbose_mode)
+ start_trex_remote_server(self.configuration.trex, self.kill_running)
+ CTRexScenario.trex = CTRexClient(trex_host = self.configuration.trex['trex_name'], verbose = self.verbose_mode)
if 'loopback' not in self.modes:
CTRexScenario.router_cfg = dict( config_dict = self.configuration.router,
@@ -164,9 +165,10 @@ class CTRexTestConfiguringPlugin(Plugin):
CustomLogger.setup_custom_logger('TRexLogger')
def finalize(self, result):
+ if self.functional:
+ return
CTRexScenario.is_init = False
- if not self.local:
- stop_trex_remote_server(self.configuration.trex)
+ stop_trex_remote_server(self.configuration.trex)
def save_setup_info():
diff --git a/scripts/automation/regression/unit_tests/trex_imix_test.py b/scripts/automation/regression/unit_tests/trex_imix_test.py
index 770edbb9..43dea900 100755
--- a/scripts/automation/regression/unit_tests/trex_imix_test.py
+++ b/scripts/automation/regression/unit_tests/trex_imix_test.py
@@ -46,8 +46,7 @@ class CTRexIMIX_Test(CTRexGeneral_Test):
print trex_res
self.check_general_scenario_results(trex_res)
-
- self.check_CPU_benchmark(trex_res, 10.0)
+ self.check_CPU_benchmark(trex_res)
# the name intentionally not matches nose default pattern, including the test should be specified explicitly
def dummy(self):
@@ -94,12 +93,12 @@ class CTRexIMIX_Test(CTRexGeneral_Test):
self.check_general_scenario_results(trex_res)
- self.check_CPU_benchmark(trex_res, 10.0)
+ self.check_CPU_benchmark(trex_res)
def test_static_routing_imix (self):
- if self.is_loopback: # in loopback mode this test acts same as test_routing_imix, disable to avoid duplication
- self.skip()
+ if self.is_loopback:
+ self.skip('In loopback mode the test is same as test_routing_imix')
# test initializtion
if not self.is_loopback:
self.router.configure_basic_interfaces()
@@ -122,7 +121,7 @@ class CTRexIMIX_Test(CTRexGeneral_Test):
l = 1000)
trex_res = self.trex.sample_to_run_finish()
-
+
# trex_res is a CTRexResult 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:")
@@ -131,7 +130,7 @@ class CTRexIMIX_Test(CTRexGeneral_Test):
print trex_res.get_latest_dump()
self.check_general_scenario_results(trex_res)
- self.check_CPU_benchmark(trex_res, 10)
+ self.check_CPU_benchmark(trex_res)
def test_static_routing_imix_asymmetric (self):
@@ -156,7 +155,7 @@ class CTRexIMIX_Test(CTRexGeneral_Test):
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:")
@@ -164,9 +163,9 @@ class CTRexIMIX_Test(CTRexGeneral_Test):
self.check_general_scenario_results(trex_res)
- self.check_CPU_benchmark(trex_res, 10)
+ self.check_CPU_benchmark(trex_res)
+
-
def test_jumbo(self):
if not self.is_loopback:
self.router.configure_basic_interfaces(mtu = 9216)
@@ -185,7 +184,7 @@ class CTRexIMIX_Test(CTRexGeneral_Test):
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:")