summaryrefslogtreecommitdiffstats
path: root/scripts/automation/regression/stateful_tests/trex_nbar_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/automation/regression/stateful_tests/trex_nbar_test.py')
-rwxr-xr-xscripts/automation/regression/stateful_tests/trex_nbar_test.py62
1 files changed, 1 insertions, 61 deletions
diff --git a/scripts/automation/regression/stateful_tests/trex_nbar_test.py b/scripts/automation/regression/stateful_tests/trex_nbar_test.py
index 69c3f605..fa3f3485 100755
--- a/scripts/automation/regression/stateful_tests/trex_nbar_test.py
+++ b/scripts/automation/regression/stateful_tests/trex_nbar_test.py
@@ -82,70 +82,10 @@ class CTRexNbar_Test(CTRexGeneral_Test):
print("\nLATEST DUMP:")
print(trex_res.get_latest_dump())
-
self.check_general_scenario_results(trex_res, check_latency = False) # NBAR can cause latency
- # test_norm_cpu = 2*(trex_res.result['total-tx']/(core*trex_res.result['cpu_utilization']))
- trex_tx_pckt = trex_res.get_last_value("trex-global.data.m_total_tx_pkts")
- cpu_util = trex_res.get_last_value("trex-global.data.m_cpu_util")
- cpu_util_hist = trex_res.get_value_list("trex-global.data.m_cpu_util")
- print("cpu util is:", cpu_util)
- print(cpu_util_hist)
- test_norm_cpu = 2 * trex_tx_pckt / (core * cpu_util)
- print("test_norm_cpu is:", test_norm_cpu)
-
-
- if self.get_benchmark_param('cpu2core_custom_dev'):
- # check this test by custom deviation
- deviation_compare_value = self.get_benchmark_param('cpu2core_dev')
- print("Comparing test with custom deviation value- {dev_val}%".format( dev_val = int(deviation_compare_value*100) ))
-
- # need to be fixed !
- #if ( abs((test_norm_cpu/self.get_benchmark_param('cpu_to_core_ratio')) - 1) > deviation_compare_value):
- # raise AbnormalResultError('Normalized bandwidth to CPU utilization ratio exceeds benchmark boundaries')
-
+ self.check_CPU_benchmark(trex_res)
self.match_classification()
- assert True
-
- @nottest
- def test_rx_check (self):
- # test initializtion
- self.router.configure_basic_interfaces()
-
- self.router.config_pbr(mode = "config")
- self.router.config_nbar_pd()
-
- mult = self.get_benchmark_param('multiplier')
- core = self.get_benchmark_param('cores')
- sample_rate = self.get_benchmark_param('rx_sample_rate')
-
- ret = self.trex.start_trex(
- c = core,
- m = mult,
- p = True,
- nc = True,
- rx_check = sample_rate,
- d = 100,
- f = 'cap2/sfr.yaml',
- 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:")
- print(trex_res)
- print("\nLATEST DUMP:")
- print(trex_res.get_latest_dump())
-
- self.check_general_scenario_results(trex_res)
-
- self.check_CPU_benchmark(trex_res, 10)
-
-# if trex_res.result['rx_check_tx']==trex_res.result['rx_check_rx']: # rx_check verification shoud pass
-# assert trex_res.result['rx_check_verification'] == "OK"
-# else:
-# assert trex_res.result['rx_check_verification'] == "FAIL"
# the name intentionally not matches nose default pattern, including the test should be specified explicitly
def NBarLong(self):