diff options
author | 2016-10-26 17:15:53 +0200 | |
---|---|---|
committer | 2016-10-26 17:15:53 +0200 | |
commit | 04300e5690aff199563cf69db39639d7cca32ce6 (patch) | |
tree | 6ac93a4afa90a4d1297adace694bceff6770369c | |
parent | 572c98db3944a53bbff51d08fd1f9c8e9674b08c (diff) |
typo
-rwxr-xr-x | scripts/automation/regression/stateful_tests/trex_rx_test.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/automation/regression/stateful_tests/trex_rx_test.py b/scripts/automation/regression/stateful_tests/trex_rx_test.py index 8bcdc83f..6c6c535a 100755 --- a/scripts/automation/regression/stateful_tests/trex_rx_test.py +++ b/scripts/automation/regression/stateful_tests/trex_rx_test.py @@ -67,13 +67,16 @@ class CTRexRx_Test(CTRexGeneral_Test): # the check. in loopback expect 0 problems, at others allow errors <error_tolerance>% of total_rx total_errors = sum(rx_counters.values()) + sum(latency_counters_compare.values()) - error_tolerance = self.get_benchmark_param('error_tolerance', 0.1) - if not error_tolerance or not allow_error_tolerance: - error_tolerance = 0 + error_tolerance = self.get_benchmark_param('error_tolerance') + if not error_tolerance: + if not allow_error_tolerance: + error_tolerance = 0 + else: + error_tolerance = 0.1 error_percentage = total_errors * 100.0 / total_rx if total_errors > 0: - if self.is_loopback or error_percentage > error_tolerance: + if error_percentage > error_tolerance: self.fail('Too much errors in rx_check. (~%s%% of traffic)' % error_percentage) else: print('There are errors in rx_check (%f%%), not exceeding allowed limit (%s%%)' % (error_percentage, error_tolerance)) |