summaryrefslogtreecommitdiffstats
path: root/scripts/automation/regression/stateful_tests
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-04-27 23:37:23 +0300
committerYaroslav Brustinov <ybrustin@cisco.com>2016-04-27 23:37:23 +0300
commit34587f930b4c8e5275341c69b178ac65ae686b37 (patch)
tree0ccd888abc2490ee31d193e8d4cdaa7944fd7d83 /scripts/automation/regression/stateful_tests
parent5698b663110d75654d2af797e2e257d5fc52485d (diff)
regression: fail on low bw_per_core
Diffstat (limited to 'scripts/automation/regression/stateful_tests')
-rwxr-xr-xscripts/automation/regression/stateful_tests/trex_general_test.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/automation/regression/stateful_tests/trex_general_test.py b/scripts/automation/regression/stateful_tests/trex_general_test.py
index 2b66deb9..31e68aa5 100755
--- a/scripts/automation/regression/stateful_tests/trex_general_test.py
+++ b/scripts/automation/regression/stateful_tests/trex_general_test.py
@@ -155,16 +155,15 @@ class CTRexGeneral_Test(unittest.TestCase):
# x2 because each thread uses 2 ports and another x2 because each core can use 2 threads
test_norm_cpu = 2 * 2 * (100.0 / cpu_util) * trex_tx_bps / (ports_count * cores * 1e6)
- print("TRex CPU utilization: %g%%, norm_cpu is : %d Mb/core" % (round(cpu_util), int(test_norm_cpu)))
+ print("TRex CPU utilization: %g%%, norm_cpu is : %g Mb/core" % (round(cpu_util), round(test_norm_cpu)))
expected_norm_cpu = self.get_benchmark_param('bw_per_core')
if not expected_norm_cpu:
expected_norm_cpu = 1
calc_error_precent = abs(100.0 * test_norm_cpu / expected_norm_cpu - 100)
print('Err percent: %s' % calc_error_precent)
- # TODO: gather statistics from regression, uncomment ASAP
- #if calc_error_precent > err:
- # raise AbnormalResultError('Excepted bw_per_core ratio %s, got %s' % (bw_per_core, test_norm_cpu))
+ if calc_error_precent > err:
+ self.fail('Excepted bw_per_core ratio: %s, got: %g' % (bw_per_core, round(test_norm_cpu)))
def check_results_gt (self, res, name, val):