From 34587f930b4c8e5275341c69b178ac65ae686b37 Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Wed, 27 Apr 2016 23:37:23 +0300 Subject: regression: fail on low bw_per_core --- scripts/automation/regression/stateful_tests/trex_general_test.py | 7 +++---- 1 file 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): -- cgit 1.2.3-korg