summaryrefslogtreecommitdiffstats
path: root/scripts/automation/regression/stateful_tests
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-04-11 01:47:32 +0300
committerYaroslav Brustinov <ybrustin@cisco.com>2016-04-11 01:47:32 +0300
commitaf49c70aaaecb897c7d3b4bddb18f504d32b0546 (patch)
tree4b30e6a2533379fd3febd512aab4e6bc359c7ba7 /scripts/automation/regression/stateful_tests
parent9b790cd6df9545ad69515560f6af62a6638a4093 (diff)
hltapi stream stats, port tx/rx graphs at console
Diffstat (limited to 'scripts/automation/regression/stateful_tests')
-rwxr-xr-xscripts/automation/regression/stateful_tests/trex_general_test.py10
-rwxr-xr-xscripts/automation/regression/stateful_tests/trex_nat_test.py2
2 files changed, 9 insertions, 3 deletions
diff --git a/scripts/automation/regression/stateful_tests/trex_general_test.py b/scripts/automation/regression/stateful_tests/trex_general_test.py
index 5a13e5ff..7eae3224 100755
--- a/scripts/automation/regression/stateful_tests/trex_general_test.py
+++ b/scripts/automation/regression/stateful_tests/trex_general_test.py
@@ -135,10 +135,16 @@ class CTRexGeneral_Test(unittest.TestCase):
if res[name] != float(val):
self.fail('TRex results[%s]==%f and not as expected %f ' % (name, res[name], val))
- def check_CPU_benchmark (self, trex_res, err = 10, minimal_cpu = 30, maximal_cpu = 85):
+ def check_CPU_benchmark (self, trex_res, err = 10, minimal_cpu = None, maximal_cpu = 85):
#cpu_util = float(trex_res.get_last_value("trex-global.data.m_cpu_util"))
cpu_util = sum([float(x) for x in trex_res.get_value_list("trex-global.data.m_cpu_util")[-4:-1]]) / 3 # mean of 3 values before last
-
+
+ if minimal_cpu is None:
+ if '1G' in self.modes:
+ minimal_cpu = 1
+ else:
+ minimal_cpu = 30
+
if not self.is_virt_nics:
if cpu_util > maximal_cpu:
self.fail("CPU is too high (%s%%), probably queue full." % cpu_util )
diff --git a/scripts/automation/regression/stateful_tests/trex_nat_test.py b/scripts/automation/regression/stateful_tests/trex_nat_test.py
index e7fe5ca5..e429bc17 100755
--- a/scripts/automation/regression/stateful_tests/trex_nat_test.py
+++ b/scripts/automation/regression/stateful_tests/trex_nat_test.py
@@ -161,8 +161,8 @@ class CTRexNat_Test(CTRexGeneral_Test):#(unittest.TestCase):
self.assert_gt(nat_stats['num_of_hits'], 50000, 'total nat hits is not high enough')
def tearDown(self):
- CTRexGeneral_Test.tearDown(self)
self.router.clear_nat_translations()
+ CTRexGeneral_Test.tearDown(self)
if __name__ == "__main__":