From: chenjiankun Date: Tue, 4 Jul 2017 03:16:55 +0000 (+0000) Subject: Bugfix: background scenario can't not update result X-Git-Tag: opnfv-5.0.RC1~430 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=8e2da9dd467f0e0a28bb92097d80d707d579bd4f;p=yardstick.git Bugfix: background scenario can't not update result JIRA: YARDSTICK-700 In this patch: https://gerrit.opnfv.org/gerrit/#/c/35257/ In yardstick/benchmark/core/task.py We update background result only when it be stopped abnormally. We need move it out of 'if' statement. Change-Id: I25b76e160273a87da66098565a16e4a143cec11f Signed-off-by: chenjiankun --- diff --git a/yardstick/benchmark/core/task.py b/yardstick/benchmark/core/task.py index 9c6caf03f..d1a4d7561 100644 --- a/yardstick/benchmark/core/task.py +++ b/yardstick/benchmark/core/task.py @@ -250,10 +250,12 @@ class Task(object): # pragma: no cover # Nuke if it did not stop nicely base_runner.Runner.terminate(runner) status = runner_join(runner) - self.outputs.update(runner.get_output()) - result.extend(runner.get_result()) else: base_runner.Runner.release(runner) + + self.outputs.update(runner.get_output()) + result.extend(runner.get_result()) + if status != 0: raise RuntimeError print("Background task ended")