From: kubi Date: Tue, 28 Jul 2015 09:17:02 +0000 (+0000) Subject: Fix a bug for algorithm of arithmetic runner. X-Git-Tag: brahmaputra.1.0~212 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F88%2F1088%2F1;p=yardstick.git Fix a bug for algorithm of arithmetic runner. since value will overstep the stop value under some condition JIRA:YARDSTICK-97 Change-Id: I11656206fc9b576283d243a3be249276dba03759 Signed-off-by: kubi --- diff --git a/yardstick/benchmark/runners/arithmetic.py b/yardstick/benchmark/runners/arithmetic.py old mode 100644 new mode 100755 index 9efafffec..f73d1cd0c --- a/yardstick/benchmark/runners/arithmetic.py +++ b/yardstick/benchmark/runners/arithmetic.py @@ -48,8 +48,9 @@ def _worker_process(queue, cls, method_name, context, scenario_args): sla_action = None if "sla" in scenario_args: sla_action = scenario_args["sla"].get("action", "assert") + margin = 1 if step > 0 else -1 - for value in range(start, stop+step, step): + for value in range(start, stop+margin, step): options[arg_name] = value