diff options
author | Hans Feldt <hans.feldt@ericsson.com> | 2015-06-03 18:04:31 +0200 |
---|---|---|
committer | Hans Feldt <hans.feldt@ericsson.com> | 2015-06-04 16:01:17 +0200 |
commit | 662efbb518793a268fb7e82057ccd9b8c197b386 (patch) | |
tree | 313175a69f4291b99fab3652f34b4c0c4555bf17 /yardstick/benchmark/runners | |
parent | a6f7294eadf66e54a65edd629513b2841136e924 (diff) |
fix exit status at SLA assertion
tested by changing SLA action to assert and lower rtt, yardstick
command should exit non zero
Change-Id: I2dd091941fb4359add849f218cacc04f364142cd
JIRA: YARDSTICK-25
Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
Diffstat (limited to 'yardstick/benchmark/runners')
-rw-r--r-- | yardstick/benchmark/runners/base.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/yardstick/benchmark/runners/base.py b/yardstick/benchmark/runners/base.py index 59ec4734a..38ca34f4b 100644 --- a/yardstick/benchmark/runners/base.py +++ b/yardstick/benchmark/runners/base.py @@ -74,6 +74,15 @@ class Runner(object): Runner.queue.put('_TERMINATE_') Runner.dump_process.join() + @staticmethod + def terminate_all(): + '''Terminate all runners (subprocesses)''' + log.debug("Terminating all runners") + for runner in Runner.runners: + runner.process.terminate() + runner.process.join() + Runner.release(runner) + def __init__(self, config, queue): self.context = {} self.config = config @@ -92,3 +101,4 @@ class Runner(object): def join(self): self.process.join() + return self.process.exitcode |