Bugfix: background scenario can't not update result 81/36881/1
authorchenjiankun <chenjiankun1@huawei.com>
Tue, 4 Jul 2017 03:16:55 +0000 (03:16 +0000)
committerchenjiankun <chenjiankun1@huawei.com>
Tue, 4 Jul 2017 03:16:55 +0000 (03:16 +0000)
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 <chenjiankun1@huawei.com>
yardstick/benchmark/core/task.py

index 9c6caf0..d1a4d75 100644 (file)
@@ -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")